How to count rotations an object has made before it lands?

Let’s assume I need to count full rotations (from 0 to 360 or -180 to 180, whichever is easier I suppose…) a cube has made before it lands.
We can also assume the axis I’d like to keep track of is the cube’s (relative?) pitch. Other objects can intercept it’s current rotation knocking it in the counter-direction.

Any ideas on how to implement this? If it needs more clarification I’d be glad to reply, thanks

You can get unsigned axis and divide by 360.
For example Abs(-900) / 360 = 2,5x full body spins.