if you are using mySQL, then following will return the number of rows (records found):
mysql_num_rows($SQL);
where $SQL is your executed SQL query. i think other db's also use the same format. e.g. for miniSQL its msql_num_rows() or for PostGres its pg_num_rows()...
hope this gets you going...
Daarius...
(note: look at php.net it has quite a useful documentation)