- array_filter: documentation ( source)
<?php
$arr = [
["name" => "Martin", "type" => "0"],
["name" => "Jack", "type" => "0"],
["name" => "Tiam", "type" => "1"]
];
echo count(array_filter($arr, function($v, $k){ return $v['type'] == 1; },ARRAY_FILTER_USE_BOTH));
?>