6. First, three, and then four people shook hands with each other. How many handshakes were there? Find the pattern in counting the number of handshakes and determine their number for 7 people.
6. When solving this problem, we should use incomplete induction. Let's analyze the first situation and try to find a pattern in determining the number of handshakes based on the number of participants. In the first case, when there were three people, the following options are possible:

$$
\text { 1-2, 1-3, 2-3. }
$$

The number of handshakes is three $(1+2=3)$.

Thus, we can hypothesize that the number of handshakes is equal to the sum of the numbers less than the number of participants by 1. Let's test this hypothesis for the second case. If four people participated in the handshakes, the following options are possible:

$$
1-2,1-3,1-4,2-3,2-4,3-4
$$

The total number of handshakes will be $6(1+2+3=6)$. The hypothesis is confirmed.

Now we can determine the number of handshakes for 7 people:

$$
1+2+3+4+5+6=21
$$

Answer: 21 handshakes.