使用jQuery计算所选选项的数量

rsa*_*acc 0 jquery

我的selectDOM中有超过53个类似的部分,我需要计算用户选择了多少特定选项.

我的DOM的一个例子是这样的:

<select name="attendance" class="dd" id="20130101">
  <option>p</option>
  <option>a</option>
  <option>s</option>
</select>
<select name="attendance" class="dd" id="20130102">
  <option>p</option>
  <option>a</option>
  <option>s</option>
</select>
... x 51 more times!
Run Code Online (Sandbox Code Playgroud)

我想要做的是返回用户选择"a"的选项的数量(计数).我试过$('.dd option:selected').length但它会返回所有选择部分的总数(为53).

谢谢你的帮助!