array_count_values in php only print value 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';
}));