Answer: up to 4 other atoms.
Explanation:
This is precisely the case for carbon (C) atoms.
Carbon has atomic number 6. So its electron configuration is 1s² 2s²p².
The four electrons in the level 2, those shown in 2s² 2p², are in two different orbitals: two are in the orbital 2s and two are in the orbitals 2p.
This diagram shows how those 4 electrons fill the orbitals
The two 2s electrons have lower energy level than the 2px and 2 py electrons, but the difference is not too big.That is why one of the electrons in the 2s ortital can be promoted to the empty 2pz orbital, and you get 4 equal hydridized ortibals, so called sp³.
And that is why, carbon (C) ends up with 4 equal (hydridized) orbitals which can bind up to 4 different atoms, including other carbon atoms, and so, form long chains and, virtually, infinite compounds.