title: array_count_values for JavaScript instead
body: <p>I have the following PHP-script, now I need to do the same thing in JavaScript. Is there a function in JavaScript that works similar to the PHP function, I have been searching for days but cannot find anything similar? What I want to do is to count the number of times a certain word is being used in an array.</p>
  
  <pre><code>$interfaceA = array($interfaceA_1,$interfaceA_2,$interfaceA_3,$interfaceA_4,$interfaceA_5,$interfaceA_6,$interfaceA_7,$interfaceA_8);       
  
  $interfaceA_array=array_count_values($interfaceA);
  $knappsatsA = $interfaceA_array[gui_knappsats];
  $touchpanelA = $interfaceA_array[gui_touchpanel];
  </code></pre>