Example 3 Given the set of integers
$M=\left\{m \mid x^{2}+m x-36=0\right.$ has integer solutions $\}$, set $A$ satisfies the conditions:
(1) $\varnothing \subset A \subseteq M$;
(2) If $a \in A$, then $-a \in A$.
The number of all such sets $A$ is ( ).
(A) 15
(B) 16
(C) 31
(D) $32^{[1]}$
(2010, National High School Mathematics League Shandong Province Preliminary Contest)
Let $\alpha, \beta$ be the integer roots of the equation
$$
x^{2}+m x-36=0
$$

Assume $|\alpha| \geqslant|\beta|$. Then
$$
\begin{array}{l}
\alpha \beta=-36 \\
\Rightarrow(|\alpha|,|\beta|) \\
=(1,36)(2,18),(3,12),(4,9),(6,6) \\
\Rightarrow m= \pm 35, \pm 16, \pm 9, \pm 5,0 \\
\Rightarrow M=\{0\} \cup\{-5,5\} \cup\{-9,9\} \cup \\
\{-16,16\} \cup\{-35,35\} \text {. } \\
\end{array}
$$

By the problem statement, $A \neq \varnothing$, and the above five subsets of $M$ are either subsets of $A$ or disjoint from $A$.

Thus, there are $2^{5}-1=31$ different non-empty sets $A$.