The Lewis structure for XeF4 shows the distribution of the valence electrons.


Group 18 Xe (8 x 1)    8 electrons
Group 17 F (7 x 4) 28 electrons
total electrons available  36 electrons
used in single bonds (4 x 2) -8 electrons
remaining electrons  28 electrons
used to complete octets at F (4 × 6) -24 electrons
placed at Xe (2 x 2) -4 electrons

There are 12 electrons (6 pairs) at Xe. Elements like those highlighted in the periodic table from the third row and beyond can accommodate more than an octet (4 electron pairs) about them.