and if they are myisam tables, that query comes back in only a few thousandths of a second, because mysql maintains current counts for myisam tables
it's kind of like the following analogy i'm very fond of...
suppose you and i are sitting in an office in new york, and i ask you to find out the population of los angeles
one way is for you to get everybody in los angeles to fly over to new york, and you count them as they get off the plane(s)
the other way is for you to go to los angeles, count them there, and come back with the answer
which do you think is more efficient?
and if it's a myisam table, it's even more efficient, you simply go to los angeles, look up the number in the population registry, and come back immediately
in a database environment, shipping the entire contents of a table between the database and the application is a huge bottleneck (just as putting people on a plane is)