Character Count In String In Python Function