mysql_num_rows() is the function you want, it'll tell you how many rows were returned. Your code can be as simple as this:
$result = mysql_query(...etc...);
if (mysql_num_rows($result) => 5) {
// mischief is afoot
}
Mysql_fetch_array is used to retrieve the values of the fields, not the number of rows. It's always good PHP practise to use var_dump() on things to teach you about their structures (like the return value of the fetch_array function), and it's always good MySQL practise to take whatever query you're using and paste it into the mysql console or into PhpMyAdmin so you can see exactly what gets returned and how.
[As an aside, you could use fetch_array to find out how many rows were returned by doing the following:
$result = mysql_query(etc);
$rows = mysql_fetch_array($result);
if (count($rows) => 5) { // count the number of elements in the array
// bounced!
}
... but obviously that's a pretty roundabout way to do it.]