If you're just counting individual keys, why not use orddict:update_counter/3?