Hi Positive, you are not clear if the machine has a tool setter, or if you are using the "RUN, TL set program.
turn on block mode and it will "step" you thru the program, the text code will display on the screen in the MDI line or go to Display and distance, and it will show multiple lines.
go to parameters Cords, and check your G5x for any values in the Z axis. ( usually used for a touch off block or a tool setter)
the P0-99 are usually blank, maybe a custom M / G code is using them. if they are not called out they do nothing. the parts counting program may be using a couple of them.
Check you display for # of parts and compare to the settings you see in P0-99
sportybob
.