Implement ticker, which provides a simple API for ticking off some number of events before indicating that the ticker has hit its limit.