Who’s doing the counting? The trampoline itself or the entity that hopped on it?
If I, as a player, bounce 5 times to get to 10m (2m per booiiinnng, let’s say), whatever else that comes into contact with it gets catapulted to 2 or 12 meters? Perhaps it’s irrelevant here but may be worth considering.
One way or another, keeping the count can be done like so:
The variable increases by 1 every time the collision is detected.