Counts all the values of an array with array array_count_values (array input)
<? $array = array(1, "hello", 1, "world", "hello"); array_count_values($array); ?>