Any $J$-class with a joined zero is a 0-simple semigroup. So your question is reduced to the following: who many idempotents has  a 0-simple semigroup? In particular, if $S$ is finite, a $J$-class (with 0) is completely 0-simple semigroup, so it has just one idempotent $\ne 0$ iff it is a group.

If a 0-simple semigroup is not completely  0-simple, nevertheless it can have an unique idempotent $\ne 0$, e.g. a bicyclic monoid.