Python Count Repeated Characters In String Python Functions