I assume, in your example, you mean there is one rectangle of size $(2, 2)$, because there are none $(4, 4)$.
In general, we have $(x - a + 1) \times (y - b + 1)$ rectangles of size $(a, b)$: we need to choose how many empty columns we leave before the rectangle $(0, 1, 2, \dots \text{ or } x-a)$, and how many rows we leave above it $(0, 1, 2, \dots \text{ or } y-b)$
So, in total, we have this area
$$
\sum_{a=1}^x \sum_{b=1}^y (x - a + 1) \times (y - b + 1) \times ab = \\
\sum_{a=1}^x \Big( a (x - a + 1) \sum_{b=1}^y b (y - b + 1)\Big) = \\
\big(\sum_{a=1}^x a (x - a + 1)\big) \big( \sum_{b=1}^y b (y - b + 1)\big)
$$
We can simplify this further by examining the sequence $A_n = \sum_{a=1}^n a (n - a + 1)$.
If we examine the first few elements of this sequence $(1, 4, 10, 20, 35, 56)$, we can notice that the sequence of differences $(1, 3, 6, 10, 15, 21)$ is exactly the sequence of triangular numbers. If that holds true in general, $A_n$ is the sum of the first $n$ triangular numbers, i.e. $A_n = \frac{n(n+1)(n+2)}{6}$ as seen here.
Here's a proof that this indeed holds in general:
$$
\begin{align}
A_n - A_{n-1} = 1 \times n &+ 2 \times (n-1) + 3 \times (n-2) + \dots + n \times 1 \\
&- 1 \times (n-1) - 2 \times (n-2) - 3 \times (n-3) - \dots = (n-1) \times 1 = \\
&= n + (2 - 1) \times (n - 1) + (3 - 2) \times (n - 2) + \dots + (n - 2 - n + 1) \times 1 \\
&=\sum_{i=1}^n i = \frac{n(n+1)}{2},
\end{align}
$$
which is indeed the $n^{\text{th}}$ triangle number.
Thus, the answer to the original question is
$$\frac{x(x+1)(x+2)}{6} \times \frac{y(y+1)(y+2)}{6}$$
and, in the case $x=y=2$ this is indeed 4.