The number of electrons in an atom is decided by the number of protons in the atom. Electrons orbit atomic nuclei, and they are like fuzzy orbital paths around an atomic nucleus. The first layer has up to two electrons. The layers after that usually contain up to eight. Covalent bonds are formed by atoms sharing valence electrons.