The numer of valence electrons is defined as the number of electrons present in the outer most shell of the atom.So, in the case if selenium, there are 6.
Despite the fact that the word silicon has a ubiquitous affiliation with all things electronic, Si itself is not a good electrical conductor. It has 4 valence electrons, meaning that filling its outer shell it can form a very strong lattice with 4 neighboring Si atoms-with no un-bonded electrons remaining