Adding support for counter batches and unlogged batches.