You would be correct. COUNT in SQL will count all the affected rows and return the number as your result.
If you need the query and number of items in a query, I am afraid we do not have enough information to help you. PHP talks to a lot of databases and there are different commands for different dbs. In the most popular one, MySQL, you would use mysql_num_rows();.