Question: how many valence electrons are in mg2+?
Answer: if an atom of an element is electronically neutral then the number of protons (atomic number) will be equal to the number of electrons. Therefore Magnesium atom has 2 valence electrons, which explains why it likes to form Mg2+ cations by losing the latter 2 electrons.