Cycle Counting Solution page 1