Example 2. On the sides $AB$, $CD$ of square $ABCD$, there are $m$, $n$ points respectively. Lines are drawn between every two points, with no three lines intersecting at the same point. How many regions do these lines divide the square into?
This problem can also be solved following the approach of Example 1, but the process is more complicated and requires certain skills. As shown in the figure, let the $m$ points on side $AB$ from top to bottom be $A_{1}, A_{2}, \cdots, A_{m}$, and the $n$ points on side $CD$ from bottom to top be $B_{0}, B_{1}, \cdots, B_{n-1}$.

First, draw $n$ lines from $A_{1}$, resulting in $n+1$ regions. Then, draw $n$ lines from $A_{2}$. Observe any line $A_{2} D_{j} (0 \leqslant j \leqslant n-1)$, it intersects exactly with the $j$ lines $A_{1} B_{i} (i=0,1, \cdots, j-1)$, dividing it into $j+1$ segments, thus adding $j+1$ regions. Therefore, after drawing $n$ lines from $A_{2}$, the number of regions added is
$$
\begin{array}{r}
\sum_{j=0}^{n-1}(j+1)=a+n, \\
\text { where } a=\sum_{j=1}^{n-1} j=\frac{n(n-1)}{2} .
\end{array}
$$

Next, consider any line $A_{3} B_{j} (0 \leqslant j \leqslant n-1)$ drawn from $A_{3}$. It intersects exactly with the $2j$ lines $A_{1} B_{i}, A_{2} B_{i} (0 \leqslant i \leqslant j-1)$, dividing it into $2j+1$ segments, thus adding $2j+1$ regions. Therefore, after drawing $n$ lines from $A_{3}$, the number of regions added is
$$
\sum_{j=0}^{n-1}(2 j+1)=2 a+n .
$$

Continuing this process, after drawing $n$ lines from each of $A_{1}, A_{2}, \cdots, A_{k-1}$, and then drawing $n$ lines from $A_{k}$, the number of regions added is $(k-1) a+n (2 \leqslant k \leqslant m)$. Thus, the total number of regions formed by all the lines is
$$
\begin{aligned}
S_{2} & =n+1+\sum_{k=2}^{m}[(k-1) a+m] \\
& =C_{m}^{2} C_{n}^{2}+m n+1 .
\end{aligned}
$$

Furthermore, we consider: If $p$ and $q$ points are added on sides $BC$ and $DA$ of the square $ABCD$ respectively, and lines are drawn between these $p+q$ points, how many regions will the square be divided into? If we still solve this problem using the above method, the discussion would be quite complex, so we must find another approach.