10. (10 points) On a plane, several unit-length sticks can be used to form a pattern of adjacent squares, as shown in the example. Now, using 20 unit-length sticks to form a pattern, it is required that except for the squares in the first row, the squares in the rows below form a rectangle. How many unit squares can such a pattern have at most? $\qquad$
【Analysis】From the above figure, we can see that only when the sides of the small squares are adjacent can we save small sticks, and the closer the shape is to a large square, the more sticks we save. Therefore, this problem can start from a $2 \times 2$ square and a $3 \times 3$ square. From the above figure, we can see that the $2 \times 2$ square on the left requires 12 sticks, and the $3 \times 3$ square on the right requires 24 sticks. The shape formed by 20 sticks can be obtained by removing some sticks from the $3 \times 3$ shape.

【Solution】
By removing 4 sticks from the $3 \times 3$ shape above, we get the following figure. Therefore, the answer to this problem is 7.