Adding support for counter batches and tests for them.