I think that it'd be better if you keep references to switches.
NSMutableArray *switches = [NSMutableArray array]; // You can do that as property
while (i < numberOfAnswers) {
UISwitch *mySwitch = [[UISwitch alloc] initWithFrame:CGRectMake(10, y+spaceBetweenAnswers-5, 0, 30)];
mySwitch.tag = i;
[_answerView addSubview:mySwitch];
i++;
[switches addObject:mySwitch];
}
Then later you don't have to iterate through every subview in view but you can iterate just switches array.
int count = 0;
for (UISwitch *switch in switches)
{
if (switch.isOn)
{
count += 1;
}
}