Can an arduino perform this task (pulse counter) ?

the code of post 38 is performing a continuous running average of the time between rising edges and calculating frequency from that
and printing every 0.1 seconds

change the code to do what you require?