  Let ${\mathcal S}(M)$ be the ring of (continuous) semialgebraic functions on
a semialgebraic set $M\subset{\mathbb R}^m$ and ${\mathcal S}^*(M)$ its subring
of bounded semialgebraic functions. In this work we compute the size of the
fibers of the spectral maps ${\rm Spec}({\tt j})_1:{\rm Spec}({\mathcal
S}(N))\to{\rm Spec}({\mathcal S}(M))$ and ${\rm Spec}({\tt j})_2:{\rm
Spec}({\mathcal S}^*(N))\to{\rm Spec}({\mathcal S}^*(M))$ induced by the
inclusion ${\tt j}:N\hookrightarrow M$ of a semialgebraic subset $N$ of $M$.
The ring ${\mathcal S}(M)$ can be understood as the localization of ${\mathcal
S}^*(M)$ at the multiplicative subset ${\mathcal W}_M$ of those bounded
semialgebraic functions on $M$ with empty zero set. This provides a natural
inclusion ${\mathfrak i}_M:{\rm Spec}({\mathcal S}(M))\hookrightarrow{\rm
Spec}({\mathcal S}^*(M))$ that reduces both problems above to an analysis of
the fibers of the spectral map ${\rm Spec}({\tt j})_2:{\rm Spec}({\mathcal
S}^*(N))\to{\rm Spec}({\mathcal S}^*(M))$. If we denote $Z:={\rm cl}_{{\rm
Spec}({\mathcal S}^*(M))}(M\setminus N)$, it holds that the restriction map
${\rm Spec}({\tt j})_2|:{\rm Spec}({\mathcal S}^*(N))\setminus{\rm Spec}({\tt
j})_2^{-1}(Z)\to{\rm Spec}({\mathcal S}^*(M))\setminus Z$ is a homeomorphism.
Our problem concentrates on the computation of the size of the fibers of ${\rm
Spec}({\tt j})_2$ at the points of $Z$. The size of the fibers of prime ideals
`close' to the complement $Y:=M\setminus N$ provides valuable information
concerning how $N$ is immersed inside $M$. If $N$ is dense in $M$, the map
${\rm Spec}({\tt j})_2$ is surjective and the generic fiber of a prime ideal
${\mathfrak p}\in Z$ contains infinitely many elements. However, finite fibers
may also appear and we provide a criterium to decide when the fiber ${\rm
Spec}({\tt j})_2^{-1}({\mathfrak p})$ is a finite set for ${\mathfrak p}\in Z$.
