Frequencies performance

Low memory (and faster) solution for frequencies.  Frequencies is now also considered more fundamental than countby.