title: how to count the number of items in a php associative array
body: <p>I have an array as below.</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [item] =&gt; Banana Cream Cheesecake
          [item_id] =&gt; 3
          [product] =&gt; Desserts
      )
  
  [1] =&gt; Array
      (
          [item] =&gt; Banana Cream Cheesecake
          [item_id] =&gt; 3
          [product] =&gt; Desserts
      )
  
  [2] =&gt; Array
      (
          [item] =&gt; Banana Cream Cheesecake
          [item_id] =&gt; 3
          [product] =&gt; Desserts
      )
  
  [3] =&gt; Array
      (
          [item] =&gt; Banana Cream Cheesecake
          [item_id] =&gt; 3
          [product] =&gt; Desserts
      )
  
  [4] =&gt; Array
      (
          [item] =&gt; Milk
          [item_id] =&gt; 2
          [product] =&gt; Soda
      )
  
  [5] =&gt; Array
      (
          [item] =&gt; Banana Cream Cheesecake
          [item_id] =&gt; 3
          [product] =&gt; Desserts
      )
  )
  </code></pre>
  
  <p>I want to print :-</p>
  
  <pre><code>Banana Cream Cheesecake = 5
  </code></pre>
  
  <p>how to do it?</p>