Example 7 (1994 National Training Team Question) Let $S=$ $\{1,2, \cdots, 10\}, A_{1}, A_{2}, \cdots, A_{k}$ be subsets of $S$, satisfying the conditions:
(1) $\left|A_{i}\right|=5(i=1,2, \cdots, k)$;
(2) $\left|A_{i} \cap A_{j}\right| \leqslant 2(1 \leqslant i<j \leqslant k)$.
Find the maximum value of $K$.
Thought analysis: We should derive an upper bound for $K$ based on the conditions that the subsets must satisfy. Let's make the following exploration: Let $A_{1}=\{1,2,3,4,5\}$, and the intersection of any two subsets has at most 2 common elements. Let $A_{2}=\{1,2,6,7,8\}$. At this point, if $\{1,2\} \subseteq A_{3}$, then we must have $|A_{1} \cap A_{3}| \geqslant 3$ or $|A_{2} \cap A_{3}| \geqslant 3$, which is a contradiction. This leads to the first conjecture: Among $A_{1}, A_{2}, \cdots, A_{k}$, at most two subsets contain the same 2-element subset. Let $A_{3}=\{1,3,6,9,10\}$. At this point, if $1 \in A_{4}$, then among $A_{1}, A_{2}, A_{3}$, except for 1, there is at most one other element that is also in $A_{4}$, and $|A_{4}| \leqslant 4$, which is a contradiction. This leads to the second conjecture: Each element in $S$ belongs to at most 3 of the subsets $A_{1}, A_{2}, \cdots, A_{k}$. At this point, we can find an upper bound for $K$.

Solution: (1) For any 2-element subset $\{a, b\} \subseteq S$, at most two of the subsets $A_{1}, A_{2}, \cdots, A_{k}$ contain $\{a, b\}$. Otherwise, suppose there are $A_{1} \supseteq \{a, b\}, A_{2} \supseteq \{a, b\}, A_{3} \supseteq \{a, b\}$. Since $|A_{i} \cap A_{j}| \leqslant 2 (1 \leqslant i < j \leqslant k)$, the sets $A_{i} - \{a, b\}$ (where $A - B = \{x \mid x \in A$ and $x \notin B\}$) are pairwise disjoint $(i=1,2,3)$. But $|A_{i} - \{a, b\}| = 3 (i=1,2,3)$, so $|S| \geqslant 3 \times 3 + 2 = 11$, which is a contradiction.
(2) For any element $a \in S$, at most three of the subsets $A_{1}, A_{2}, \cdots, A_{k}$ contain $\{a\}$. Suppose there are $A_{1} \supseteq \{a\}, A_{2} \supseteq \{a\}, A_{3} \supseteq \{a\}$. If $|A_{i} \cap A_{j}| = 1 (1 \leqslant i < j \leqslant 3)$, then $|A_{1} \cup A_{2} \cup A_{3}| = 3 \times 4 + 1 = 13$, which is a contradiction. Suppose $b \neq a$ and $a, b \in A_{1} \cap A_{2}$, then $|A_{1} \cup A_{2}| = 8$. According to (1), $b \notin A_{3}$ and $|A_{3} \cap A_{1}| \leqslant 2, |A_{3} \cap A_{2}| \leqslant 2$, so $A_{3}$ has at most 2 elements not in $A_{1} \cup A_{2}$, i.e., $\overline{A_{1} \cup A_{2}} \subset A_{3}$.

Similarly, if there is $A_{4} \supseteq \{a\}$, then $\overline{A_{1} \cup A_{2}} \subseteq A_{4}$, so $|A_{3} \cap A_{4}| \geqslant 3$, which is a contradiction.

Therefore, for any $a \in S$, $a$ belongs to at most 3 of the subsets $A_{1}, A_{2}, \cdots, A_{k}$. So each element in $S$ is counted at most 3 times in $|A_{1}| + |A_{2}| + \cdots + |A_{k}|$, hence $|A_{1}| + |A_{2}| + \cdots + |A_{k}| \leqslant 3|S| = 30$, so $K \leqslant 6$.

According to the above idea, we can construct 6 subsets that meet the conditions:
$$
\begin{array}{l}
\{1,2,3,4,5\}, \{1,2,6,7,8\}, \{1,3,6,9, \\
10\}, \{2,4,7,9,10\}, \{3,5,7,8,10\}, \{4,5,6,8, \\
9\}.
\end{array}
$$

Therefore, the maximum value of $K$ is 6.