I've seen that code Guido, but there is more to that code.? For others coming here and seeing the link to the code above.? Please see for more info on how to implement it. But basicly, you program that code into a small microprocessor, something like a ATTiny85, though others even use a Nano.? You then connect you high-pulse count encoder to the processor, and it outputs a divide/N signal that you then feed to yourRaduinos encoder inputs:
