If you're using checkboxes, then you'll have to count each value.
Assuming that you're simply using true/false values something like the following:
<label><<checkbox "$classOne" false true>> Class One</label>
<label><<checkbox "$classTwo" false true>> Class Two</label>
Then you could do something like the following to count the number of classes which were picked:
<<set _classCount to [
<<if _classCount lt 7>>
/* Less-than 7 classes were picked. */
SEE: <<checkbox>> and <Array>.count().