If an atom let's say X has an atomic number of 16, we know that this refers to the number of protons the atom has.
If the ion charge is -2, we can use this simple equation solve for electrons.
No. of protons - No. of electrons = ion charge
16 - ? = -2
16 - 16 - ? = -2 - 16
- ? = -18
-?/- = -18/-
? = 18.
The ? = no of electrons for this ion, which is 18 electrons.
Basically this is an ion of S - Sulfur with an ion charge of -2, and because of this ion charge it has 18 electrons, it has gained 2 electrons from another atom, preferably a metal.