Make a Lapping System for a Car Game

I am making a car game. Right now, it is just a car game where you just drive around and jump of ramps. I was thinking of using OnColliderEnter on invisible boxes to establish waypoints scattered around the track. then when the car passes through say, 10 of them, it makes a var increase by 1. Then when that var has reached a max of 4 or so, then it displays a GUI saying YOU WIN!. This could then be used to make a simple tracking system to determine which car is in the lead. But i do not want to create a AI trakcing systme yet so yea…

I am not asking for a complete code, that would be nice, but not necessary.
Just a couple pointers in the right direction, maybe just a couple bits of pseudo code.

Thanks,
- Jordan

You can count a lap each time a Collider with tag “StartPoint” is hited, and compare if is player.
Like e.g:

var laps : int = 0;

function OnTriggerEnter(other : Collider) {

    if (other.CompareTag("Player"))

        laps++;

    Debug.Log("I've completed " + laps + " laps.");

    if (laps == 3 )

        Application.LoadLevel(1);

}