array_count_values() returns an array using the values of array as keys and their frequency in array as values.