Use count instead of map for more succinct hamming implementation in ruby.