LordSmile,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script>
function test()
{
var len = !!document.querySelectorAll('#form_id :checked').length;
alert(len)
}
</script>
</head>
<body>
<form name="form_name" id="form_id" action="/" method="post">
<input type="checkbox" name="checkbox_1" id="checkbox_1" value="1"/>
<input type="checkbox" name="checkbox_2" id="checkbox_2" value="2"/>
<input type="checkbox" name="checkbox_3" id="checkbox_3" value="3"/>
<input type="checkbox" name="checkbox_4" id="checkbox_4" value="4"/>
<input type="checkbox" name="checkbox_N" id="checkbox_N" value="N"/>
<input type="hidden" name="hidden" value="ok" />
<input type="submit" id="form_submit" />
</form>
<button id="form_button" onclick="test()">SUBMIT</button>
</body>
</html>