Mechanism of carrier generation in conducting polymers