Example 2 In a carriage, any $m(m \geqslant 3)$ passengers have a unique common friend (if A is a friend of B, then B is also a friend of A, and no one is a friend of themselves), how many friends does the person with the most friends have in this carriage?


Solution: Let the person $A$ with the most friends have $k$ friends, denoted as $B_{1}, B_{2}, \cdots, B_{k}$, and let $S=\left\{B_{1}, B_{2}, \cdots, B_{k}\right\}$.
Obviously, $k \geqslant m$.
If $k>m$, let $\left\{B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}\right\}$ be any $(m-1)$-element subset of $S$, then $A, B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}$ these $m$ people have 1 common friend, denoted as $C_{i}$. Since $C_{i}$ is a friend of $A$, hence $C_{i} \in S$.
Define the mapping:
$$
f:\left\{B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}\right\} \rightarrow C_{i} \in S .
$$

Then $f$ is an injection from the set of all $(m-1)$-element subsets of $S$ to $S$.
In fact, if there exist two different $(m-1)$-element subsets of $S$
$$
\left\{B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}\right\}
$$

and $\left\{B_{j_{1}}, B_{j_{2}}, \cdots, B_{j_{m-1}}\right\}$
both having the same image $C_{i}$, and since
$$
\left.\cdot\left\{B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}\right\} \cup B_{j_{1}}, B_{j_{2}}, \cdots, B_{j_{m-1}}\right\}
$$

contains at least $m$ elements, hence these $m$ people have 2 common friends $A$ and $C_{i}$, which contradicts the given condition.
Since $f$ is an injection, hence $\mathrm{C}_{k}^{m-1} \leqslant k$.
Because $m \geqslant 3, m-1 \geqslant 2$, so,
$$
\begin{array}{l}
(k-1)(k-2) \cdots(k-m+2) \\
>(m-1)(m-2) \cdots 2=(m-1)!
\end{array}
$$

Thus, $\mathrm{C}_{k}^{m-1}=\frac{k(k-1)(k-2) \cdots(k-m+2)}{(m-1)!}$
$$
>\frac{k(m-1)!}{(m-1)!}=k \text {. }
$$

Contradiction. Therefore, the required $k=m$.