Example 4.10 Find the number of integer points inside (including the boundary) the square in the Cartesian coordinate system $Oxy$ with vertices at $A(5,0)$, $B(0,5)$, $C(-5,0)$, and $D(0,-5)$.
Solution: Let the required number be $N$. The equation of the line passing through points $A(5,0)$ and $B(0,5)$ is $x + y = 5$. By symmetry, the point $(x, y)$ is an integer point within the square if and only if $|x| + |y| \leqslant 5$ and both $x$ and $y$ are integers. Therefore, $N$ is the number of integer solutions to the equation
$$
|x| + |y| + z = 5
$$
satisfying the condition $z \geqslant 0$. Thus, $N$ is the coefficient of $t^5$ in the expansion of
$$
A(t) = \left(1 + 2t + 2t^2 + 2t^3 + \cdots\right)^2 \left(1 + t + t^2 + t^3 + \cdots\right),
$$
and
$$
\begin{aligned}
A(t) & = \left[2(1-t)^{-1} - 1\right]^2 (1-t)^{-1} \\
& = (1+t)^2 (1-t)^{-3} \\
& = \left(1 + 2t + t^2\right) \sum_{k=0}^{\infty} \binom{k+2}{2} t^k,
\end{aligned}
$$
Therefore,
$$
\begin{aligned}
N & = \binom{5+2}{2} + 2 \binom{4+2}{2} + \binom{3+2}{2} \\
& = \binom{7}{2} + 2 \cdot \binom{6}{2} + \binom{5}{2} \\
& = 21 + 30 + 10 \\
& = 61
\end{aligned}
$$