Count analog pulses

Hi I want to count the pulses from my energy meter, When i loop and read the sensor, i can count the pulses But how count the pulses within a time period eg. a minut an save that sum to a variable?

/Trident

But how count the pulses within a time period eg. a minut an save that sum to a variable?

Use the BlinkWithoutDelay principle using millis() for timing.

Save the millis() value at the time that the start action happens. Then, each time through loop(), check whether the required wait period has elapsed by subtracting the start time from the millis() value now. If the period has elapsed then act accordingly and maybe save the start time for the next activity. If not, then go round loop() again, taking other actions and/or reading inputs such as adding one to a count each time an input goes HIGH, but don't block the free running of loop().