You can achieve it with the "size()" function to get the number of check boxes selected as,noOfOptionsSelected = input.CheckBox.size();
noOfOptionsSelected = input.CheckBox.size();