In special situations you might only want to count the first level of the array to figure out how many entries you have, when they have N more key-value-pairs.
<?php
$data = [
'a' => [
'bla1' => [
0 => 'asdf',
1 => 'asdf',
2 => 'asdf',
],
'bla2' => [
0 => 'asdf',
1 => 'asdf',
2 => 'asdf',
],
'bla3' => [
0 => 'asdf',
1 => 'asdf',
2 => 'asdf',
],
'bla4' => [
0 => 'asdf',
1 => 'asdf',
2 => 'asdf',
],
],
'b' => [
'bla1' => [
0 => 'asdf',
1 => 'asdf',
2 => 'asdf',
],
'bla2' => [
0 => 'asdf',
1 => 'asdf',
2 => 'asdf',
],
],
'c' => [
'bla1' => [
0 => 'asdf',
1 => 'asdf',
2 => 'asdf',
]
]
];
$count = array_sum(array_values(array_map('count', $data)));
var_dump($count);
var_dump(count($data, 1));
?>