Dear Cool,

maybe this is what you want:

class Array



  def count

    k=Hash.new(0)

    self.each{ |x| k[x]+=1 }

    k

  end



end


my_array = ["a", "a", "a", "b", "b", c, "c", "c","d", "d", "e"]
my_array.count 

It gives you a Hash, though, and the numbers are Integers,
not Strings, but this seems more reasonable :)

Best regards,

Axel
-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail