Postgresql Window Function Count Python String Methods Cheat