puoi anche usare la funzione mysql_num_rows();