Are you confusing a database with a database table?
A database consists of a number of tables.
Tables consist of a number of rows.
To count the number of rows in a given table, using PHP with mysql, we can use something along the lines of:
$query = mysql_query("SELECT fieldname FROM tablename");
$num_rows = mysql_num_rows($query);