Hi,
My problem solved as follows:
As I described everything was good. In diagnostics screen all inputs and outputs worked fine. The reason Mach4 didn't display the actual RPM was just a screen set misconfiguration. I clicked the "Edit Screen" menu item then selected the "Spindle RPM" text field. Then in the "DRO Code" property I just selected "Spindle True RPM" then save.
After that Mach4 started to display the true RPM that comes from the encoder.
Solved this by an accident took my 2 weeks. Dang!
Your 2 week accident saved me a ton of time. I had already spent most of a day pulling my hair out over this. Thanks for posting your solution. Worked like a champ!