CounterRemover is a utility class that automatically removes listeners after the listeners are triggered for certain times.
CounterRemover is a pure functional class. After the member functions in CounterRemover are invoked, the CounterRemover object can be destroyed safely.
<aname="apis"></a>
## API reference
### Header
eventpp/utilities/counterremover.h
### Template parameters
```c++
template <typenameDispatcherType>
class CounterRemover;
```
`DispatcherType` can be CallbackList, EventDispatcher, or EventQueue.
The member functions have the same names with the corresponding underlying class (CallbackList, EventDispatcher, or EventQueue), and also have the same parameters except there is one more parameter, `triggerCount`. `triggerCount` is decreased by one on each trigger, and when `triggerCount` is zero or negative, the listener will be removed.
The default value of `triggerCount` is 1, that means the listener is removed after the first trigger, which is one shot listener.
Since CounterRemover takes one template parameter and it's verbose to instantiate its instance, the function `counterRemover` is used to construct an instance of CounterRemover via the deduced argument.