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$.