Simplest way to get count of keys with a particular value
<p><strong>Given a javascript object, what is the simplest way to get the number of keys with a particular value?</strong></p>

<p>For example, I have the following javascript object (where the key indicates a test script id and the value indicates the result of the script execution):</p>

<pre><code>var result = {1: "PASS", 2: "PASS", 3: "FAIL", 4: "PASS", 5: "FAIL"};
</code></pre>

<p>I would like to get the count of keys with the value "PASS" (3 in this case) in the simplest way possible.</p>