store a counter in the datastore for each batch