  Given a polynomial map $\psi:S^m\to \mathbb{R}^k$ with components of degree
$d$, we investigate the structure of the semialgebraic set $Z\subseteq S^m$
consisting of those points where $\psi$ and its derivatives satisfy a given
list of polynomial equalities and inequalities (we call such a set a
"singularity"). Concerning the upper estimate on the topological complexity of
a polynomial singularity, we sharpen the classical bound $b(Z)\leq O(d^{m+1})$,
proved by Milnor, with \begin{equation}\label{eq:abstract} b(Z)\leq
O(d^{m}),\end{equation} which holds for the generic polynomial map. For what
concerns the "lower bound" on the topology of $Z$, we prove a general
semicontinuity result for the Betti numbers of the zero set of $\mathcal{C}^0$
perturbations of smooth maps -- the case of $\mathcal{C}^1$ perturbations is
the content of Thom's Isotopy Lemma (essentially the Implicit Function
Theorem). This result is of independent interest and it is stated for general
maps (not just polynomial); this result implies that small continuous
perturbations of $\mathcal{C}^1$ manifolds have a richer topology than the one
of the original manifold. We then compare the extremal case with a random one
and prove that on average the topology of $Z$ behaves as the "square root" of
its upper bound: for a random Kostlan map $\psi:S^m\to \mathbb{R}^k$ with
components of degree $d$, we have: \begin{equation}
\mathbb{E}b(Z)=\Theta(d^{\frac{m}{2}}).\end{equation} This generalizes
classical results of Edelman-Kostlan-Shub-Smale from the zero set of a random
map, to the structure of its singularities.
