How might I add check to see if a key already exists, and if does, increment the value, and if it doesn\'t exist, then set the initial value?
Something like this pseudo-
dict[key] = (dict[key] || 0) + 1;