using System;
using System.Linq;
public class Program
{
public static void Main()
string text = "sOmetExT";
var fr = text.ToUpper()
.GroupBy(x => x)
.Select(x => new {val = x.Key, count = x.Count()})
.ToArray();
foreach(var x in fr)
Console.WriteLine("{0} - {1}",x.val,x.count);
}