Get hybrid orbitals first-1/2[V+M+A-C]
Where,
V-valence electrons of main atom
M-Monovalent atoms(H,F,Cl,Br,I)
A-Anionic charge(if any)
C-cationic charge(if any)
Then finally,
Lone pairs= hybrid orbitals-attached atoms.
1. SO2
V=6
M=0
A=0
C=0
hybrid orbitals=(6+0+0+0)/2
lone pairs=3-2=1
bond pairs=hybrid orbitals-lone pairs=3-1=2
1. SiCl4
V=4
M=4
A=0
C=0
hybrid orbitals=(4+4+0+0)/2
lone pairs=4-4=0
bond pairs=hybrid orbitals-lone pairs=4-0=4