Laps are sometimes not counted correctly
This can have several reasons. Most likely you missed the start/finish sensor because your car was drifting a bit. Please make sure to have at least one full straight built before your finish line (more are better) to reduce the likeliness of this to happen.
Another reason could be that another drive crashed and someone hit the start button. If the car for which the lap was not counted was on the finish straight, it may have passed the sensor after the start button was pressed (without power). In that case the lap would also not be counted.