Counting a particular voltage pulses in a given input signal

I need to count the number of pulses with particular voltage (5v) in a given input signal. I mean "How many pulses for 5seconds?". Im using the ardiuno uno board for my project.

OK. What part is giving you problems? What have you tried so far? Where is the code you have now?

What kind of signal? Does it have 2V pulses and 5V pulses and 20V pulses and 220V pulses and ... ? Or is it just a 5V digital signal?