Currently I am using an MySQL query to gather all the IDs pertaining to a specific category and then I use mysql_num_row() to count the number of rows to get the total.

Is there a more efficient way to do this? I know there is a COUNT() for MySQL but I didn't know how to return that and actually use it in PHP.

Thanks