MaxCounters solution