Postgres Query Count Characters Python Snake Size