Stellar molecular abundances. I - Polyatomic molecules.