Scott, this looks pretty much exactly like what Tim's example does: you have a dictionary (aka associative array, aka mapping, depending on your terminology) mapping keys to a counter.
Dicts are reasonably fast in Julia, although they could certainly be further optimized (like almost anything).
