How many d-electrons are in the outer shell of the metals in following compounds:
In zinc sulfide, two s-electrons have been removed from $\ce{Zn(0)}$ to make $\ce{Zn^{2+}}$. Therefore, yes, it does have 10 d-electrons. 


In its lattice, zinc is bound to four sulfur atoms which fulfills the 18-electron rule (10 from $\ce{Zn^{2+}}$ and 2 each from four separate $\ce{S^{2-}}$; the 18-electron rule for transition metals is the equivalent of the octet rule for main-block elements). In this case, however, the metal (zinc) still only has 10 d-electrons. The additional electrons are in hybrid, non-d orbitals.