title: Count instances of string in an array
body: <p>I have an array in jQuery, and I need to count the number of "true" strings in that array, and then make the "numOfTrue" variable equal the number of true strings. So in the below array, there are 2 "true" strings, so numOfTrue would be equal to 2.</p>
  
  <pre><code>var numOfTrue;
  var Answers = [ "true", "false", "false", "true", "false" ];
  </code></pre>
  
  <p>I'm not sure how to do a loop through the array in jQuery to count the strings. Or is a loop even necessary?</p>
  
  <p>The number of true strings could change from anywhere between 1 to 5.</p>