Sorry if I sounded a little sarcastic. It's a genuine suggestion though. Also, you're not providing information about how/when the position is set to be higher then -5 again, so I can't say if this happens in a single frame or not.
It is a little difficult to ascertain what you want from that section of code.
Unless you are processing the event instantly the eventCount will increment every frame that your transform position is less than -5... that could be 1000 times a second. So as Joshua answered, adding a timeout before you can increment eventCount again will probably fix your issue.
Sorry if I sounded a little sarcastic. It's a genuine suggestion though. Also, you're not providing information about how/when the position is set to be higher then -5 again, so I can't say if this happens in a single frame or not.
– anon73820239