Electron counting is a formalism used for classifying compounds and for explaining or predicting electronic structure and bonding. Many rules in chemistry rely on electron-counting:
Polyhedral skeletal electron pair theory for cluster compounds, including transition metals and main group elements such as boron including Wade's rules for polyhedral cluster compounds, including transition metals and main group elements and mixtures thereof.
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.
Counting rules
Two methods of electron counting are popular and both give the same result.
The neutral counting approach assumes the molecule or fragment being studied consists of purely covalent bonds. It was popularized by Malcolm Green along with the L and X ligand notation. It is usually considered easier especially for low-valent transition metals.
The "ionic counting" approach assumes purely ionic bonds between atoms. One can check one's calculation by employing both approaches.
It is important, though, to be aware that most chemical species exist between the purely covalent and ionic extremes.
Neutral counting
This method begins with locating the central atom on the periodic table and determining the number of its valence electrons. One counts valence electrons for main group elements differently from transition metals.
One is added for every halide or other anionic ligand which binds to the central atom through a sigma bond.
Two is added for every lone pair bonding to the metal. Unsaturated hydrocarbons such as alkenes and alkynes are considered Lewis bases. Similarly Lewis and Bronsted acids contribute nothing.
This method begins by calculating the number of electrons of the element, assuming an oxidation state
Two is added for every halide or other anionic ligand which binds to the metal through a sigma bond.
Two is added for every lone pair bonding to the metal. Similarly Lewis and Bronsted acids contribute nothing.
For unsaturated ligands such as alkenes, one electron is added for each carbon atom binding to the metal.
Electrons donated by common fragments
"Special cases"
The numbers of electrons "donated" by some ligands depends on the geometry of the metal-ligand ensemble. An example of this complication is the M–NO entity. When this grouping is linear, the NO ligand is considered to be a three-electron ligand. When the M–NO subunit is strongly bent at N, the NO is treated as a pseudohalide and is thus a one electron. The situation is not very different from the η3 versus the η1 allyl. Another unusual ligand from the electron counting perspective is sulfur dioxide.
These examples show the methods of electron counting, they are a formalism, and don't have anything to do with real life chemical transformations. Most of the 'fragments' mentioned above do not exist as such; they cannot be kept in a bottle: e.g. the neutral C, the tetraanionic C, the neutral Ti, and the tetracationic Ti are not free species, they are always bound to something, for neutral C, it is commonly found in graphite, charcoal, diamond, as for Ti which can be found as its metal, C4− and Ti4+ 'exist' only with appropriate counterions. So these formalisms are only used to predict stabilities or properties of compounds!