Compile error

Seems like your problem is the algorithm itself, not Julia.

What exactly you want to do with your first loop? Why do you decrement the quantity available of some word if it is not already in the dict? (and if it is not in the dict, how will you decrement its value? if it isn’t in the dict it has no value) I would expect you to set the value of a word as 1 if it does not exist, and increment if it already exists. Also, I do not think in does what you want, are you sure you do not want haskey?

Ideally, you should provide your code, some input, the return of your code for that input, and describe what you wanted instead.