title: Count elements in each sub array in php
body: <p>An example from <a href="http://php.net/manual/en/function.count.php" rel="noreferrer">php.net</a> provides the following</p>
  
  <pre><code>&lt;?php
  $food = array('fruits' =&gt; array('orange', 'banana', 'apple'),
            'veggie' =&gt; array('carrot', 'collard', 'pea'));
  
  // recursive count
  echo count($food, COUNT_RECURSIVE); // output 8
  
  // normal count
  echo count($food); // output 2
  ?&gt;
  </code></pre>
  
  <p>How can I get the number of fruits and the number veggies independently from the $food array (output 3)?</p>