Counting pulses with Arduino Nano

GiovannyS10:
I have a function generator. I want to read it, and after every 40 pulses i want to stop it for one second. Just it. But it must be precisely 40 pulses.

Wouldn't it be much simpler to generate the 40 pulses with your Arduino?

...R