The page class contains a property called Controls. You can iterate through that list, and check the type. If it's a checkbox, cast it as one, access the "Checked" property, and add. Here's some sample code:
int checkedBoxes = 0;
foreach (Control c in Controls)
if (c is CheckBox)
if (((CheckBox)c).Checked)
checkedBoxes++;