MaxCounters lesson (exercise in Lesson 2 'Counting Elements')