Count the number of selected options using jQuery
<p>I have over 53 similar <code>select</code> sections in my DOM and I need to count how many of a particular option have been selected by the user.</p>

<p>An example of my DOM would be something like this:</p>

<pre><code>&lt;select name="attendance" class="dd" id="20130101"&gt;
  &lt;option&gt;p&lt;/option&gt;
  &lt;option&gt;a&lt;/option&gt;
  &lt;option&gt;s&lt;/option&gt;
&lt;/select&gt;
&lt;select name="attendance" class="dd" id="20130102"&gt;
  &lt;option&gt;p&lt;/option&gt;
  &lt;option&gt;a&lt;/option&gt;
  &lt;option&gt;s&lt;/option&gt;
&lt;/select&gt;
... x 51 more times!
</code></pre>

<p>What I would like to do is return the quantity (count) of options where the user has selected "a" for example. I have tried <code>$('.dd option:selected').length</code> however it returns the total count of all select sections (being 53).</p>

<p>Thanks for any help!</p>
