Question:
How many different rectangles with sides parallel to the grid can be formed by connecting four of the dots in a $4\times 4$ square array of dots, as in the figure below?
[asy]size(2cm,2cm); for (int i=0; i<4; ++i) { for (int j=0; j<4; ++j) { filldraw(Circle((i, j), .05), black, black); } } [/asy] (Two rectangles are different if they do not share all four vertices.)

Answer:
We count the number of rectangles by cases, based on the side lengths of the rectangle: \[
\begin{array}{|c|c|}\hline
\text{Side lengths of rectangle} & \text{Number of rectangles} \\ \hline
1 \times 1 & 9 \\ \hline
1 \times 2 & 6 \\ \hline
1 \times 3 & 3 \\ \hline
2 \times 1 & 6 \\ \hline
2 \times 2 & 4 \\ \hline
2 \times 3 & 2 \\ \hline
3 \times 1 & 3 \\ \hline
3 \times 2 & 2 \\ \hline
3 \times 3 & 1 \\ \hline
\end{array}
\] So the number of rectangles whose sides are parallel to the sides of the grid is $9+6+3+6+4+2+3+2+1 = \boxed{36}.$

Extra challenge: If you know what "combinations" are in counting problems, try to find a much faster solution!