penso che nel codice puoi usare la funzione mysql_num_row e far ogni volta stampare questo valore
Regole del Forum