Since a chemical bond has two electrons, the “number of bonding electrons divided by 2” is by definition equal to the number of bonds surrounding the atom. So we can instead use this shortcut formula:
Formal Charge = [No. of valence electrons of atom] – [non-bonded electrons + number of bonds].