How long a filter lasts depends on a number of things, including the type and size of the filter, where its placed in the engine compartment, how much of it is exposed to air, and how much you drive on dirt, gravel, and off-road. For a number of years, I had 79 Dodge pickup and a 90 Dodge pickup that I drove interchangeably in my neck of the woods, mostly on pavement, with some driving on gravel roads. The 90 Dodge was bought new and went over 50,000 mi. before the air filter got dirty, mainly I believe because of where it was placed in the engine compartment and the fact that it was inside an airbox. The air filter in the 79 Dodge was the old, round, type, with a big hole in the middle, that fit in a metal container that sat on top of the carb and the container had a funnel coming out of it. That was the traditional setup on the old, carbed, engines. That air filter consistently had to be replaced every 2,000 to 3,000 miles.
For a paper filter, I knock it against a hard flat surface till dirt stops coming off. Then I hold it up to the sun to see how easy it is to see through it. Then I see if I can gently breath through it. If I can see through it and easily breath through it I figure its still good. But, if your engine's not running right after you put the air filter back on, change the filter.