In chemistry, electron counting is a formalism for assigning a number of valence electrons to individual atoms in a molecule.  It is used for classifying compounds and for explaining or predicting their electronic structure and bonding.  Many rules in chemistry rely on electron-counting:
*Octet rule is used with Lewis structures for main group elements, especially the lighter ones such as carbon, nitrogen, and oxygen,
*18-electron rule in inorganic chemistry and organometallic chemistry of transition metals,
*Hückel's rule for the π-electrons of aromatic compounds,
*Polyhedral skeletal electron pair theory for polyhedral cluster compounds, including transition metals and main group elements and mixtures thereof, such as boranes.
Atoms are called "electron-deficient" when they have too few electrons as compared to their respective rules, or "hypervalent" when they have too many electrons.  Since these compounds tend to be more reactive than compounds that obey their rule, electron counting is an important tool for identifying the reactivity of molecules.  While the counting formalism considers each atom separately, these individual atoms (with their hypothetical assigned charge) do not generally exist as free species.