var count = $("input[name='box']:checked").length; <input name='box'> <input name='box'> <input name='box'>