Orbital Hybridisation
For main group compounds, if there are lone electron pairs, only those with the correct symmetry to interact with the bond pairs should be counted in the Xi number, but bond angles become smaller due to increased p-character (the lone pairs adopt increased s-character according to Bent's rule). For example, in ammonia (NH3), the nitrogen atom has three bonds with H and one lone electron pair (as can be seen with the valence bond theory as well from the electronic configuration of nitrogen), which means there are four such 'elements' on N. The model molecule is, then, AX4: sp3 hybridisation is utilized, and the electron arrangement of NH3 is tetrahedral. This agrees with the experimentally-determined shape for ammonia, a non-planar, pyramidal structure, with a bond angle of 107.8 degrees (the lone-pair is not visible). For transition metal compounds, such lone pairs are stereochemically inactive and do not influence the shape.
In general, for an atom with s and p orbitals forming hybrids hi and hj with included angle, the following holds: 1 + ij cos = 0. The p-to-s ratio for hybrid i is i2, and for hybrid j it is j2. In the special case of equivalent hybrids on the same atom, again with included angle, the equation reduces to just 1 + 2 cos = 0. For example, BH3 has a trigonal planar geometry, three 120° bond angles, three equivalent hybrids about the boron atom, and thus 1 + 2 cos = 0 becomes 1 + 2 cos(120°) = 0, giving 2 = 2 for the p-to-s ratio. In other words, sp2 hybrids, just as expected from the list above.
Read more about Orbital Hybridisation: Hybridisation Theory Vs. MO Theory