Solved problem 85 (counting rectangles).