Hola becu.
Prueba este código:
Código HTML:
<html>
<head>
<title>Untitled</title>
<script>
function contar(frm) {
var num=0;
for(i=0;i<frm.elements.length;i++)
if(frm.elements[i].type=="checkbox")
if(frm.elements[i].checked) num++;
document.getElementById('txt').value=num;
}
</script>
</head>
<body>
<form>
<input type="checkbox" />
<input type="checkbox" />
<input type="checkbox" />
<input type="text" id="txt" />
<input type="button" onclick="contar(this.form)" />
</body>
</html>
Saludos,