A resetable counter block
[sim, out] = ld_counter(sim, events, count, reset, resetto, initial)
count * - signal
reset * - signal
resetto * - signal
initial - constant
out * - output
increases out by count (out = out + count)
if reset > 0.5 then
out = resetto
initially out is set to initial