In un database.

$count_comments = mysql_query("SELECT COUNT(ID) FROM commenti WHERE articolo='ArticoloUno'") or die ("etc.");
$res_count_comments = mysql_fetch_row($count_comments);
// numero totale di commenti
$tot_records_comments = $res_count_comments[0];

provo a fare:

for ( $c=1 ; $c < = $tot_records_comments ; $c++ )
{
if ( $c == $res_count_comments[$c] )
{
break ;
}
echo "Il numero commento è $c";
}

ma non funziona...