The 12V in the diagram is incorrect. I originally used 12V Relays but changed to the 24V and never updated the diagram, sorry.
The erratic operation does not have any constant pattern;
I'm looking for the count 1, 2, 3, 4, Reset. and it works OK but when I add the 1200V. i'm getting; 2,4,2,Rst or 1,1,1,3,2,Rst, or 1,4,Rst, etc... the combinations are endless. Also sometimes it will switch twice for one press of the switch, for example 1-4,2,3,4,Rst with pushing the switch 5 times.
Apologies for the explanation but it's not easy to describe. The outputs of the counter do not run in the correct sequence.