How do you count duplicates in a ruby array?
For example, if my array had three a\'s, how could I count that
arr = %w( a b c d c b a ) # => ["a", "b", "c", "d", "c", "b", "a"] arr.count('a') # => 2