  A number of papers deal with the problem of counting the number of
retractions of a structure $S$ onto a substructure $T.$ In the particular case
when $S$ is a free algebra, this number is $\geq 1$ iff $T$ is projective. In
this paper we consider the case when $T$ is a projective lattice-ordered
abelian group with a distinguished strong order unit, or equivalently, a
projective MV-algebra.
  Let $A$ be a retract of the free $n$-generator MV-algebra
$\mathcal{M}([0,1]^n)$ of McNaughton functions on $[0,1]^n$. We prove that the
number $\mathsf{r}(A)$ of retractions of $\mathcal{M}([0,1]^n)$ onto $A$ is
finite if, and only if, the maximal spectral space $\mu_A$ is homeomorphic to a
(Kuratowski) closed domain $M$ of $[0,1]^n$, in the sense that
$M=\mathsf{cl}(\mathsf{int}(M))$. Further, the closed domain condition is
decidable and $\mathsf{r}(A)$ is computable, once a retraction onto $A$ is
explicitly given. Thus every finitely generated projective MV-algebra $B$ comes
equipped with a new invariant $\iota(B)=\sup\{\mathsf{r}(A) \mid \mbox{$A\cong
B$ for $A$ a retract of $\mathcal{M}([0,1]^{k})$} \},$ where $k$ is the
smallest number of generators of $B$. We compute $\iota(B)$ for many projective
MV-algebras $B$ considered in the literature. Various problems concerning
retractions of free MV-algebras are shown to be decidable. Via the $\Gamma$
functor, our results and computations automatically transfer to finitely
generated projective abelian $\ell$-groups with a distinguished strong unit.
