Still can't quite pin point what the issue is. Your snippet of code seems to work in both.
Another issue: emoji! (Why did I venture down this rabbit hole.)
Emoji seems to function differently across different IDE. The same script that works greats in Drawbot is in Sublime.
Also was trying to count emojis in Drawbot.
from collections import Counters