title: Getting total number of checked checkboxes
body: <p>I have a form with checkboxes with the input being stored in an array:</p>
  <pre><code>&lt;input type=&quot;checkbox&quot; name=&quot;lineup[]&quot; value=&quot;1&quot;&gt;Tom&lt;/input&gt;
  &lt;input type=&quot;checkbox&quot; name=&quot;lineup[]&quot; value=&quot;2&quot;&gt;David&lt;/input&gt;
  &lt;input type=&quot;checkbox&quot; name=&quot;lineup[]&quot; value=&quot;3&quot;&gt;Sarah&lt;/input&gt;
  </code></pre>
  <p>Using jQuery I want to find how many checkboxes are ticked/checked:</p>
  <pre><code>var total=$(this).find('input[name=lineup]').serialize();
  
  alert(total.length);
  </code></pre>
  <p>However the total is always output a 0. What am I doing wrong?</p>