Update Problem52.py

Replaced boilerplate with Counter !