Python Count Method String In Python Function