# How many d-eletrons are in the outer shell of following compounds:

How many d-electrons are in the outer shell of the metals in following compounds:

$\ce{ZnS}$ and $\ce{NiS}$

So sulphur does not has any $\ce{d}$ electrons and $\ce{Zn}$ has $10\ce{d}$ electrons.

But I am pretty sure that this question is more complex to answer like that.

What is considered as the outer shell? as $\ce{Zn}$ has the electrons in the $3\ce{d}$ shell but there is still a filled $4\ce{p}$ shell?

Does it also matter that it is a compound ? ($\ce{ZnS}$ not only $\ce{Zn}$). As I see no reason why they included $\ce{S}$ but I guess it has an important reason.

I am new to transition metals, any help would be really appreciated.