Im assuming that your car ran fine before this and it is probably safe to say that something you did while changing your air filter caused this problem. The first thing I would do is check the Mass Airflow sensor. It is located right next to the air filter in the large tube/hose. If you take the air cleaner out and look into the hose you should see a wire. If it looks like there is debris on it then you might want to try cleaning it. If it has been broken then you will need a new one.
This is the first thing I would check. I would also go through my exact steps in replacing the air filter and see if there is anything at all that you can remember that might have caused a problem.
I hope this helps.