Hi! Thank you so much for your nice comment :)
The position counter is a bit overkill in this game xD There are around 50 triggers around the whole track, used as checkpoints. Each kart keeps count on the lap it's running now, its current checkpoint, the target checkpoint and the distance to the latter. Then a race controller compares all karts progression data and sorts them in order!
There's a lot of room for optimization, but worked like a charm so who cares! Here's a pic so you can see what I'm talking about.