Counting the 'spaces' inside the grid refers to finding the area of the shape, as that's what surface area is: the amount of space inside the shape, so the number of a certain size of spaces inside a grid. The perimeter is completely different. It is the distance around the side of the shape, i.e. the sum of the length of each of the shape's sides.
Because the inside is the area, and the outside or exactly on the line is the perimeter
Perimeter measures the total distance around a shape and does not include spaces inside the figure, which are used to calculate area. The perimeter is derived from adding the lengths of the sides, while area measures the amount of space contained within those sides. Thus, areas and perimeters are distinct concepts in geometry.
;