You can, but if you want just a count it'd probably be more efficient to use the COUNT() aggregate (assuming proper indexing in use).
Pulling data is a matter of using mysql_fetch_array or any derivative such as mysql_fetch_assoc, mysql_fetch_row or mysql_fetch_object. Then you can index the record based on query field order. These are always incremental per call, so you can use a
while($row = mysql_fetch_assoc($result)) loop to fetch each record.
Also, mysql library is now officially deprecated. If your starting on something new,it'd be much wiser to use the MySQLi or PDO libraries instead.
header('HTTP/1.1 420 Enhance Your Calm');