A rectangle is basically a set of $2$ pairs of parallel lines.
If you have $h$ and $v$ horizontal and vertical lines, then you have $h-1$ and $v-1$ parts.
Then the total number of rectangles is the total number of combinations of horizontal lines, multiplied with the total number of combinations of vertical lines.
This is $^hC_2\cdot^vC_2$, which is equal to $${hv (h-1)(v-1)}\over4$$
In your case $h=7, v=10$, which gives $945$ rectangles. Quite a lot to count, so you are possibly expected to know the formula, or derive it yourself.