Fix the aggregate output in CounterFilter

The interval can exceed the test condition when there is no input
causing the aggregate to never be flushed again