Example 7: Xiao Li and his brother attended a gathering, along with two other pairs of brothers. After meeting, some people greeted each other with handshakes, but no one shook hands with their own brother, and no one shook hands with the same person twice. At this point, Xiao Li noticed that, apart from himself, everyone had a different number of handshakes. How many times did Xiao Li shake hands? How many times did Xiao Li's brother shake hands?
Explanation: From the problem, it is easy to see that the maximum number of handshakes for each person is 4, and the minimum is 0. Also, except for Xiao Li, each person has a different number of handshakes. Therefore, the 5 people must have handshakes 0 times, 1 time, 2 times, 3 times, and 4 times respectively.

Using points to represent people and lines between points to represent handshakes. Let $F$ and $E$ represent Xiao Li and his partner, and $A$, $B$, $C$, $D$ represent the other two pairs of brothers, where $A$ and $B$, $C$ and $D$ are brothers.

First, consider the point with 4 lines. First, exclude point $E$, because if point $E$ connects 4 lines, these 4 lines must connect to $A$, $B$, $C$, and $D$ respectively. Thus, the point without any line connected would be a contradiction. Therefore, the point connecting 4 lines must be among $A$, $B$, $C$, and $D$. Assume it is point $C$, and these 4 lines are $C A$, $C B$, $C E$, and $C F$. Then, the point without any line connected is $D$ (as shown in Figure 2).

Next, consider the point that only connects 1 line. First, exclude point $E$, if point $E$ only connects 1 line, then $A$ and $B$ can each connect at most 1 line to point $F$. This way, there would be no point connecting 3 lines, which is a contradiction. Therefore, the point that only connects 1 line can only be $A$ or $B$. Assume it is $A$. At this point, $E$ can only connect 1 line to $E B$, so there must be 1 line between $B$ and $F$ (as shown in Figure 3).

In summary, Xiao Li shakes hands twice, and Xiao Li's partner shakes hands twice.