<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript">
window.onload = function () {
$('input[type=checkbox]').on('change', function () {
if($(this).prop("checked")) $("#number").html(parseInt($("#number").html()) + 1);
else $("#number").html(parseInt($("#number").html()) - 1);
});
}
</script>
<div id="number">0</div>
<input type="checkbox" value="1" name="option1" />
<input type="checkbox" value="2" name="option2" />
<input type="checkbox" value="3" name="option3" />
<input type="checkbox" value="4" name="option4" />
<input type="checkbox" value="5" name="option5" />
<input type="checkbox" value="6" name="option6" />