Well... are you doing something else with the data, or are you just trying to count the number of times they appear? If you're not using the data, you can simply have MySQL do all the counting for you, i.e.
$query = 'SELECT COUNT(id) as Number WHERE `name` = \'Jack\'';
$exec = mysql_query($query);
$number_of_times = mysql_result($exec, 0);
OR if you ARE using the data, and what to count the number of times they appear in addition, I would do something like this:
$theArray = array(
1 => 'Jack',
2 => 'Tim',
3 => 'Jack',
4 => 'Chris');
$number = count(array_keys($theArray, 'Jack'));
echo $number; // prints "2"