3. (3 points) Count the number of rectangles in the figure: $\qquad$.

将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。
Note: The last sentence is a repetition of the instruction and should not be included in the translation. Here is the correct translation:

3. (3 points) Count the number of rectangles in the figure: $\qquad$.
【Solution】Solution: $(3+2+1) \times(2+1)$
$$
\begin{array}{l}
=6 \times 3, \\
=18 \text { (pieces). }
\end{array}
$$

Answer: There are a total of 18 rectangles.
Therefore, the answer is: 18.