Example 7 Let $M=\{1,2, \cdots, 10\}, A_{1}, A_{2}, \cdots, A_{n}$ be distinct non-empty subsets of $M$, such that when $i \neq j$, $A_{i} \cap A_{j}$ has at most two elements. Find the maximum value of $n$.

 untranslated text remains the same as the source text in terms of line breaks and formatting.
Solution: First, the number of one-element, two-element, and three-element subsets of $M$ is $C_{10}^{1}+C_{10}^{2}+C_{10}^{3}=175$, so the maximum value of $n$ is $\geqslant 175$. Let $B_{1}, B_{2}, \cdots, B_{n}$ be distinct non-empty subsets of $M$, and when $i \neq j$, $B_{i} \cap B_{j}$ has at most two elements. If one of $B_{1}$, $B_{2}, \cdots, B_{n}$, say $B_{i}$, has more than 3 elements, and $a \in B_{i}$, then replacing $B_{i}$ with $B_{i} \backslash\{a\}$ still satisfies the problem's requirements. Continuously performing this replacement, we can eventually make each subset in the family have at most 3 elements. Therefore, $n \leqslant C_{10}^{1}+C_{10}^{2}+C_{10}^{3}=175$.
In conclusion, the maximum value of $n$ is 175.