Delivery Hero interview question

Python word counting problem without using string methods