I am trying to make a javascript function (although jquery is perfectly OK) that will return a number that corresponds to the number of checkboxes checked in a form. Seems
var chk = $('form').find('input[type=checkbox]:checked').length