title: Find the number of objects in a json array
body: <p>I have searched a lot and I found few methods to find the length of my JSON array. I have tried:</p>
  
  <ol>
  <li><code>count</code></li>
  <li><code>json.length</code></li>
  </ol>
  
  <p>but these return 1, instead of the actual length. I want to show it using PHP.</p>
  
  <p>My json is:</p>
  
  <pre><code>$huge = '[{"location":[{"building":["Default Building"],"name":"Default Location"}],"name":"Default Organization"},{"location":[{"building":["test_loc1_building1","test_loc1_building2"],"name":"test location1"},{"building":["test_loc2_building2"],"name":"test location2"}],"name":"test Organization"}]';
  </code></pre>
  
  <p>How can I find the number of objects in my JSON array?</p>