So,
Jamie has made a 2 x 4 rectangle, composed of squares.
Visualizing this setup, we can first see that the 4 squares lengthwise touch each other in pairs. So that's 4 already.
In addition, notice that there are three columns in the widths. Also notice that each column has 2 pairs of touching sides. So 2 * 3 = 6 more pairs.
6 + 4 = 10
There are 10 pairs of sides that touch each other.