Problem 2 counting comparisons solved