Newbie Help 100 inputs before output

Hi, I am anewbie with arduino. I need to design a game where as user needs to do 100 clicks from a switch before it output or release a door lock to open. How do i do this?

You could try counting the switch actuations.

Search for “state change detection” so you only increment the count when the switch changes rather than while it has changed.

Your loop needs to look for the switch to operate then increment the count and set a flag to stop more increments until the switch is released. At that time you reset the flag to wait for next press of the switch.

Also look for “debouncing switches”.

While developing your program set the count to say 5. Once you have the logic working change to your required value.