Hi Loïc,
We did a project where we displayed the current unit counts of each type at each time step.
Basically, you have to do it yourself. We took the event list (there are two main ones if I remember well) and filter out all the UnitCreateEvent, UnitDeathEvent, etc.
So took all the relevant events of those types, then split them by player, then by unit.
Once you have all the CreateUnitEvent, UnitDoneEvent, etc for player1's Zealots. Going through that list and looking at the times allows one to calculate the number of active zealots for player1 at time t. We were focused on unit lifetimes, but the unit counts at each time can be seen on our graph.
At first, things looked good, we were getting unit counts but I noticed, "hey both these guys are making very few gateway units, that's odd" then I watched the replay and it was full of gateway units! That was because there is one event for a unit popping out of a building, and one event for a unit finishing to warp in. Archons make two high templars disappear and one Archon appear. I was really excited when I saw it in my graph: the lifetime of two high templars stop at time t, then a couple seconds later an archon appears.
Feel free to ask me more questions.