title: JQuery selector check the number of checkboxes has been checked
body: <p>What I'm trying to is run some code if the number of <code>input[type="checkbox"]</code> is checked equal to the value of 2 or 3.</p>
  
  <p>Here is an example of my JQuery:</p>
  
  <pre><code>if ($('input:checkbox:checked').length == 2 or 3) {
    // run some code
  }
  </code></pre>
  
  <p>Im not sure how to program it to understand whether the value is 2 or 3.</p>
  
  <p>Any ideas?</p>