Facing some problem declaring interrupts

Sure, look at the API example code, it's a bit more paired down.

Once the PCNT is activated it requires no CPU time to count pulses.