This sounds like a custom script. You'll want a script that responds to the button press, reads a register value, increments and saves the register value, and a DRO that just displays the data in the register. The DRO is a dumb object on the screen - just a display. Adding the homing would be easy
The signals script is probably the best place to write this code. I tend to add to the signals enumeration inside the screen load script, although it can be done elsewhere. PMC is also an option, but this is such a simple script, I'd encourage you to try out LUA. Do some research on the signals script and how to read and write registers. Feel free to ask questions here if you get stuck.
If this is a mechanical switch, your hardware better have some filtering or you'll get input bounce where it will count many times for a single switch hit. This can be handled in software too, but easier if your motion controller filters inputs (I know the ESS does).
I don't know how the machine would have worked originally, but I would personally want 2 cases. An M05 should ramp the spindle to a stop gently, however (if your VFD can handle it with a braking resistor) an ESTOP should stop the spindle in a minimum amount of time. No need to do this for every stop as it will stress the electrical components in your VFD and wear it out faster.
Mike