Update parse_and_count54.py

optmized parse_and_count