I have an array of hashes called @messages :
[{ "id" => "1", "user_name" => "John", "content" => "xxxxx" },
{ "id" => "2", "user_name" => "John", "content" => "yyyyy" },
{ "id" => "3", "user_name" => "Paul", "content" => "zzzzzz" },
{ "id" => "4", "user_name" => "George", "content" => "xxyyzz" }]
What is the method to count the different values of user_name in @messages (which should give 3 here)?