how many electrons are in the second subshell of this element?
You're answer is correct. The s-shell has 2 electrons in the 1s subshell, 2 electrons in the 2s subshell, 2 electrons in the 3s subshell and 1 electron in the 4s subshell. The d-shell has 5 electrons in the 3d subshell.

The element with atomic number 24 is chromium, who's electron configuration can be shown diagramatically as follows:



Note that the 3d shell is 'half-filled' before the 4s subshell is completely filled.

Chromium is one of the 'exceptions to the predicted electron configurations' when applying Madelung's rule for quantum numbers and electron configuration. The 'Aufbau' principle (represented in diagram below) can be used to determine the electron structure of relatively simple atoms, by hand, as long as one remembers the anomalies (such as chromium and copper). The 'anomaly' is typically 'explained' by stating that the a 'half-filled' or 'completely filled' d-subshell is more stable and will therefore happen before 'completely filling' the 4s subshell.



In modern quantum computational chemistry, various numerical methods (such as Dirac Hyper Hartree–Fock method and density functional theory) have been devised to iteratively solve the Schrodinger equation for more accurate calculation of electronic structures of larger atoms and molecules.