how array_count_values imp,emted in php code example
Example: php count array elements with specific key
$cnt = count(array_filter($array,function($element) {
return $element['your_key']=='foo';
}));
$cnt = count(array_filter($array,function($element) {
return $element['your_key']=='foo';
}));