revised and commented code for countingSyllables.py