for example, if SWITCH_1 was pressed 4 times it would record 4
Counting the number of times a switch becomes pressed, or released, is trivial. That's what the state change detection example is all about.
I don't see, though, the relationship between switch 1 being pressed four times and the value in a combination.
Suppose that the combination was 1, 7, 4, 8. I would expect, then, to have to press switch 1, then switch 7, then switch 4, and then switch 8. I would not expect to have to press switch 3 four times.
Even if that was the expectation, there is nothing in your spec about having to press the switches in any particular order. As long as each switch is pressed the proper number of times, you'd be allowed in.