node counter(res: bool; tick: bool) returns (o: int) let o = if res then 0 else if tick then 1 -> pre o + 1 else 0 -> pre o; tel