valence electron count
Think of a metal atom in a complex as having a number of seats at its table, and the goal is usually to fill them. The valence electron count is simply the headcount: how many electrons are sitting around the metal once you add up what the metal itself brings and what every ligand contributes. For transition metals the table tends to be comfortably full at eighteen guests, and chemists use that number constantly to guess whether a complex will be stable, hungry for more ligands, or eager to shed one.
Here is why eighteen, and what to do. A transition metal's valence shell is built from one s orbital, three p orbitals and five d orbitals, which is nine orbitals in all; nine orbitals holding two electrons each comes to eighteen. The 18-electron rule says that many stable organometallic complexes arrange to have exactly eighteen valence electrons, filling that whole set and reaching the closed-shell stability of the next noble gas. To count, take the metal's group number for its d-and-s electrons (in the neutral convention), add the electrons donated by each ligand (CO gives 2, a hydride or methyl gives 1, eta-5 cyclopentadienyl gives 5, an eta-2 alkene gives 2, and so on), then adjust for the overall charge. The two conventions, ionic and neutral, take different routes but must land on the same final total if you are consistent.
The honest part is that eighteen is a guideline, not a law. It works beautifully for low-valent middle-and-late transition metals surrounded by good pi-acceptor ligands like carbonyls, where it predicts formulas with uncanny reliability. But there are whole families of robust exceptions: square-planar d8 complexes of rhodium, iridium, palladium and platinum are perfectly happy at sixteen electrons, and many early transition metals fall short of eighteen because they simply do not have enough ligands or electrons to fill all nine orbitals. Treat the count as a sharp, cheap first guess that is right most of the time, then notice when geometry or position in the periodic table tells you to expect a different magic number.
Take Cr(CO)6. Chromium is group 6, so it brings 6 electrons; each of the six CO ligands gives 2, adding 12; the complex is neutral. Total: 6 + 12 = 18 electrons. The count predicts a stable, saturated molecule, and indeed chromium hexacarbonyl is an air-stable white solid.
Metal group electrons plus ligand-donated electrons, adjusted for charge, gives the valence count.
Eighteen is a useful target, not a requirement; square-planar d8 complexes settle happily at sixteen, and many early transition metals never reach eighteen at all.