Solved MaxCounters in java