Thank you for your answer.
I did a few tests, and there is only one scenario where the count is wrong.
It's when the event add_a_ball try to add WHILE all the balls are on the playfield.
- multiball 3 balls
- add_a_ball event
- 4 balls on the playfield
- add_a_ball event {nothing happens, only 4 balls in the game} --> 4 balls on the playfield
- if i drain 1 ball, mpf gives me back 1 ball {i think mpf count the fifth ball i asked for} --> 4 balls on the playfield
- i drain 2 balls
- multiball ends --> 2 balls on the playfield
- i drain 1 ball
- the ball end with 1 ball on the playfield