For s-block and p-block elements, valency is typically the number of valence electrons or eight minus the number of valence electrons. For d-block and f-block elements, valency includes electrons in both valence and d or f orbitals.