Codice PHP:
$query mysql_query("select count(*) from tabella") or die(mysql_error() );
$result mysql_fetch_row($query);
echo 
$result[0];