Boron, #Z=5#, has 3 valence electrons: #2s^(2)2p^1#. Carbon, #Z=6#, has 4 valence electrons: #2s^(2)2p^2#. Nitrogen, #Z=7#, has 5 valence electrons: #2s^(2)2p^3#. And fluorine, #Z=7#, has 7 valence electrons: #2s^(2)2p^5#. Of course, these valence electrons are active in the geometry and structure of the compounds of these species.