You can do it with linq for example:
string text =
string searchTerm1 = "Type=\"Story\"",
searchTerm2 = "Type=\"Story\"";
var matchQuery = from i in text
where i.ToLowerInvariant() == searchTerm1.ToLowerInvariant() ||
i.ToLowerInvariant() == searchTerm2.ToLowerInvariant()
select i;
int count = matchQuery.Count();