The only way I could have a part counter to work on the lathe is by using a digital counter plugged to the USB relay board.
I already use the USB relay board for the collet closer.
I just use one of the relays to send a pulse to the counter. I know this is not what you really want to do but it works for me.
Jeff