fork download
using System;
using System.Linq;
public class Test
{
	public static void Main()
	{
		string str = "Lorem ipsum is great.Loremocountsalso lorem ipsum Lorem...";
        String searchWhat = "Lorem";
        int count = str.Split(new[]{' ','.'},StringSplitOptions.None)
                       .Count(w => w.Contains(searchWhat));
        Console.Write("Count={0}",count);
	}
}
Success #stdin #stdout 0.05s 37136KB
stdin
Standard input is empty
stdout
Count=3