Hey,
For the first one, I've at times used COUNT(*) or mysql_numrows() (or whatever based on the SQL you are using. With either, I assume that the query to the db is only going to ask for results that meet the conditions you refer to. If you just need the number of results, COUNT() is better. It is a one step process. Should be something like...
"SELECT COUNT(*) FROM someplace WHERE something = something"
Hope that helps (and is correct, I'm going from memory). By the way, it's in the MySQL manual that should've come with it. Check it there if you are still having issues.
later on,
Terrence