Press Keys more than once before action

Good day everyone.

So I am wondering whether there is a simple way to be able to only perform an action if keys or your mouse clicks have been used more than once. for example, id like to make a destructible mesh collapse only after I’ve pressed my mouse 8 times (could be a different number of times, 8 is an example). is there a way to do this using blueprints? I’m very, very new to UE4 so go easy with the technical terms. :wink: Im sure there is an easy answer but I have no idea…

Create a variable to keep track of how many times a key is pressed. Each time the key is pressed add 1 to that variable. Each time the key is pressed check to see if the variable is greater or equal to 8. If it is, set the variable back to zero and then make the destructible mesh collapse.