batch the counter statements