i didnt sayed it was easy, this would take me to long to 'show you' you have multiple npc's these have to be compaired to eachother and to the player, there is still much to do, like surrounding borders so player/npc cant go way offroad, you are however already counting the waypoints per npc
as for the npc crossing finish,
for each npc
on collision with startline
npc.name = Mcdonalds | add 1 to npc.currentlap