You’ve got 2 different problems.
Check out the ball count unit as pointed tscottn. It is involved in ending the game by going to the “6th” ball when the ball hits the outhole switch on ball 5. That timing is what’s going to kill the power to O and everything downstream. Check the state of the 6th position switch when the game is done.
For the ball count not incrementing problem, I’d focus on the score motor switches 1C, 2B, and 4C. These may not be gapped properly, causing incorrect timing.
The sequence is:
1. Ball goes in the hole and closes the ball return switch
2. The O relay energizes, starting the score motor
3. The ball return fires through the 4C switch, near the end of the score motor rotation
4. The score motor switch at 2B opens, causing the O relay to drop out.
5. The ball passes over the trough switch, relying on the score motor being in the zero position, with 1C and 2B closed, and switches on S, A, E, normally closed.
Hope this helps,
Dave