Can an arduino perform this task (pulse counter) ?

Is this sketch counting the pulses that happen during 0.1 seconds? Or is it measuring the time between consecutive rising edges of the input signal and creating an average value of the period between edges during 0.1 seconds and then calculating frequency from that?

I'd rather have this code perform a count of the rising edges that happen over a precise 1.000 second time interval.