Racing game?

Hello, can someone help me, I am doing a career game project, I am not an expert, and I do not understand much, but I would like to know if someone can guide me how to make a system of turns for the game, that is the simplest, that count the laps I take and a certain number of laps the game is over. Currently I have it with three checkpoints, I count the laps but I can’t get it to stop on lap three.

This may help with counting your “laps”.

thank you very much I could solve it in another way!