Increase variable while true, decrease while false?

I understand the logic, but how would I do this in blueprints? I can’t use if and else statements.