Added factory function for creating multiple counters