collections counter () hackerrank solution python