A proper proof would use the method of proof by induction, but we will be a little less formal. If the polynomial equation \(p(x) = 0\) has no solutions at all, then clearly the number of solutions is not more than the degree \(n\text{.}\) On the other hand, if this equation has distinct solutions \(x_1,x_2,\dotsc,x_\ell\text{,}\) then it is a fact of algebra that we can factor \(p(x)\) as
\begin{equation*}
p(x) = (x-x_1)^{m_1} (x-x_1)^{m_2} \dotsm (x-x_\ell)^{m_\ell} q(x),
\end{equation*}
where each exponent \(m_i\) is equal to the number of times solution \(x=x_i\) is repeated as a root of the equation (called the multiplicity of the root), and \(q(x)\) is another polynomial with no roots.
Since the degree of the factorization of
\(p(x)\) above must be the same as the degree of
\(p(x)\text{,}\) the sum
\(m_1 + m_2 + \dotsb + m_\ell\) cannot be greater than
\(n\text{,}\) and this sum of multiplicities is exactly the number of roots of the equation
\(p(x)=0\) (including repetition).