Ingavr and acetronics thanks for replying!Have you any idea how to make it working to count simultaneously the 2 channels?

Mister_e thanks for replying.If i use a pull-up resistor of 2.7K is that ok?Should i turn the internal pull-ups off?