Counting multiple pulse input