title: PHP Count function with Associative Array
body: <p>Could someone please explain to me how the count function works with arrays like the one below? </p>
  
  <p>My thought would be the following code to output 4, cause there are 4 elements there:</p>
  
  <pre><code>$a = array 
  (
    "1" =&gt; "A",
     1=&gt; "B",
     "C",
     2 =&gt;"D"
  );
  
  echo count($a);
  </code></pre>