Statistics for Tailor-made synthesis of poly(3-hexylthiophene) with carboxylic end groups and its application as a polymer sensitizer in solid-state dye-sensitized solar cells