I doubt I’ll be able to help with the project, unfortunately, but I’ll give my thoughts on overtaking.
A pass made whilst one driver is in the pitlane and another is on the track is a change in position, but not an overtake, same goes for when both cars are in the pit lane and leave in a reversed order from which they entered, so I’d say that anything involving the pitlane doesn’t count as an ‘overtake’, but does obviously count as a change in position.
If a driver passes another, then gets re-passed before the end of the lap, I would class as 2 overtakes. Sure, the timing beam on the start/finish straight would count their positions the same as the lap before, but actual physical overtaking has occurred, twice, so I feel it counts twice.
As for first lap passes, I wouldn’t say they don’t count, but certainly the first 3-4 corners are always a free-for-all. I think each track has a point around the lap where the cars will settle in a nose-to-tail order for the first time. In Melbourne, for instance, this would be on the curved back straight after the Clark Chicane. Anything before then on the first lap is just a result of the pack scrambling for position. Anything after that fast chicane is usually the result of a proper pass rather than the driver just trying to slot in. Of course this changes at each track. At Monza, I’d say the cut-off point would be after the Lesmo corners, Silverstone (from the new start-finish straight) would probably be Copse, Suzuka would be the hairpin after the crossover.
Also you have passes where a driver goes off to consider. Is it counted as an ‘overtake’ where a driver passes another who is bobbing through the gravel? A change in the running ovder, definately, but an overtake? I’m not so sure.
Certainly an overtaking maneuver that results in the defending car going off and the attacking car would be an overtake, because the overtake has resulted in the off, rather than the overtake happening due to one car already being ‘off’.
Just my two cents.