A resetable, limited counter block
[sim, out] = ld_limitedcounter(sim, events, count, reset, resetto, initial, lower_b, upper_b)
count * - signal
reset * - signal
resetto * - signal
initial - constant
out * - output
increases out by count (out = out + count), but count is always between lower_b and upper_b
if reset > 0.5 then
out = resetto
initially out is set to initial