Creating a variable to count

How to create a variable to contain the number of correct entries and open a door if they are right

:face_in_clouds: