What is the unabbreviated electron configuration of iron?

Of atomic iron, $Z = 26$........
$1 {s}^{2} 2 {s}^{2} 2 {p}^{6} 3 {s}^{2} 3 {p}^{6} 4 {s}^{2} 3 {d}^{6}$..........
But hang on......the atomic number $Z$ specifies the number of massive, positively-charged nuclear particles. Why should this be equal to the number of electrons in the neutral atom?