add array_count_values_recursive function