How do you count duplicates in a ruby array?
For example, if my array had three a\'s, how could I count that
To count instances of a single element use inject
array.inject(0){|count,elem| elem == value ? count+1 : count}