J.R. S. answered 09/10/22
Ph.D. University Professor with 10+ years Tutoring Experience
Assuming you refer to only valence electrons and not all of the core electrons as well...
There is a short way and a long way of doing this. I'll provide both.
Short method: Look in the periodic table and use s-block, p-block, d-block and f-block information
Cd(Z=48). In the periodic table it is a d-block element and is the 10th one, so has 10 d electrons
Fr(Z=87). In the periodic table it is an s-block element and is the 1st one, so has 1 s electron.
Cr(Z=24). In the periodic table it is a d-block element and is the 4th one, so expected to have 4 d electrons.
BUT, it is more stable if the d orbital is half full so a 4s electron moves and it now has 5 d electrons.
Long method: Write out the electron configuration:
Cd(Z=48). [Kr]5s24d10
Fr(Z=87). [Rn]7s1
Cr(Z=24). [Ar]4s13d5