How to create a counter in simulink
<p>I would like to count how many times my signal goes to zero. For example having an impulse signal as input I want a variable which counts how many times the impulse goes to zero.</p>

<p>I´m becoming crazy thinking of something....can anybody help me?
Thanks</p>