Example 6 In a carriage, any $m(m \geqslant 3)$ passengers have a unique common friend (when A is a friend of B, B is also a friend of A. No one is a friend of themselves). How many friends does the person with the most friends have in this carriage?
(5th National Training Team Selection Test)
Let the person with the most friends have $k$ friends. Clearly, $k \geqslant m$. If $k > m$, let $A$ have $k$ friends $B_{1}, B_{2}, \cdots, B_{k}$, and denote $S=\left\{B_{1}, B_{2}, \cdots, B_{k}\right\}$.

Let $B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}$ be any $m-1$ elements chosen from $S$, then $A_{1}, B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}$ these $m$ people have a unique common friend, denoted as $C_{i}$. Since $C_{i}$ is a friend of $A$, it follows that $C_{i} \in S$, which means that every $m-1$ elements in $S$ correspond to a unique element in $S$.

Furthermore, if $\left\{B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}\right\} \neq\left\{B_{j_{1}}, B_{j_{2}}, \cdots, B_{j_{m-1}}\right\}$, and the unique common friends of $\left\{A, B_{i_{1}}, \cdots, B_{i_{m-1}}\right\}$ and $\left\{A, B_{j_{1}}, \cdots, B_{j_{m-1}}\right\}$ are $C_{i}, C_{j} \in S$ respectively, then it must be that $C_{i} \neq C_{j}$, otherwise $\left\{B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}\right\} \cup \left\{B_{j_{1}}, B_{j_{2}}, \cdots, B_{j_{m-1}}\right\}$ would have at least $m$ elements, and they would have at least two friends $A$ and $C_{i}$, which contradicts the given condition.
Thus, the above correspondence is an injection. Therefore, the number of $(m-1)$-element subsets of $S$ is $C_{k}^{m-1} \leqslant k$. However, when $m \geqslant 3$, $m-1 \geqslant 2$, at this time $C_{k}^{m-1} > C_{k}^{1} = k$, which contradicts the above result, indicating that $k > m$ cannot hold.
Hence, the maximum number of friends the person with the most friends can have is $m$.