title: Counting occurrence of specific value in an Array with PHP
body: <p>I am trying to find a native PHP function that will allow me to count the number of occurrences of a particular value in an array.  I am familiar with the array_count_values() function, but that returns the count of all values in an array.  Is there a function that allows you to pass the value and just return the instance count for that particular value?  For example:</p>
  
  <pre><code>$array = array(1, 2, 3, 3, 3, 4, 4, 5, 6, 6, 6, 6, 7);
  
  $instances = some_native_function(6, $array);  //$instances will be equal to 4
  </code></pre>
  
  <p>I know how to create my own function, but why re-invent the wheel?  </p>