On the stability of doped conducting polymers: electrostatic contributions and sterical effects