Con un bucle. Si tu formulario es algo así:
Código HTML :
<form id="form_check" name="form_check" action="#" method="post">
<input type="checkbox" name="cat1">
<input type="checkbox" name="cat2">
<input type="checkbox" name="cat3">
<input type="checkbox" name="cat4">
<input type="checkbox" name="cat5">
<input type="checkbox" name="cat6">
<input type="checkbox" name="cat7">
</form>
En javascript recorres tu formulario buscando todos los checkbox y compruebas si estos están marcados.
Código Javascript :
function validarCheckbox(){
var formulario = document.form_check;
var elementosTotales = formulario.elements.length;
var total_checked = 0;
for(i=0;i<elementosTotales;i++)
{
if((formulario.elements[i].type=="checkbox")
&&(formulario.elements[i].checked))
{ total_checked++; }
}
alert("hay "+total_checked+" checkboxs marcados");
}
Es una función de ejemplo, modificala a tu gusto. Saludos.