The influence of the counterion on the electronic structure in doped phenylene-based materials