char myChar = 'x'; string myString = "xyz"; int count = myString.Count(s => s == myChar);
int count = Regex.Matches(test, "word").Count;