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; 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 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 $\left\{B_{i,}, B_{i,}, \cdots, B_{i_{m-1}}\right\}$ be any $(m-1)$-element subset of $S$, then $A, B_{i}, B_{i,}, \cdots, B_{i-1}$, these $m$ people have a unique common friend, denoted as $C_{i}$. Since $C_{i}$ is a friend of $A$, we have $C_{i} \in S$. Define the mapping
$$
f:\left\{B_{i}, B_{i,}, \cdots, B_{i}, m-1\right) \rightarrow C_{i} \in S \text{, }
$$

Then $f$ is an injection from the set of all $(m-1)$-element subsets of $S$ to $S$. In fact, if there are two different $(m-1)$-element subsets $\left\{B_{i_{1}}, B_{i_{2}}, \cdots, B_{i_{m-1}}\right\}$ and $\left\{B_{i_{1}}, B_{i_{i}}\right.$, $\left.\cdots, B_{j_{m-1}}\right\}$ of $S$, both having the same image $C_{i}$, then $\left\{B_{i,}, \cdots, B_{i_{m-1}}\right\} \cup\left\{B_{j_{1}}, \cdots, B_{j_{m-1}}\right\}$ contains at least $m$ elements, and these $m$ people have two common friends $A$ and $C_{i}$, which contradicts the given condition.

Since $f$ is an injection, we have $\mathrm{C}_{k}^{m-1} \leqslant k$. On the other hand, since $m \geqslant 3, m-1 \geqslant 2$, we have $\mathrm{C}_{k}^{m-1} \geqslant \mathrm{C}_{k}^{2} > \mathrm{C}_{k}^{1} = k$, a contradiction. Therefore, the maximum value sought is $m$.