The reason for not counting was a cold solder junction at the enameled copper wire what does the modification of PCB from T2-CH4 to T3_ETR pin. As soon as there is a signal with edges at the ETR pin, the above posted code increments the counter like expected. >no matter what I tried I couldnot count ETR pulses Try the code from above and check your ETR pin for present pulses. If they are missing, there must be a hardware bug...