var text = "test the text test on test platform";
var words = text.Split(' ');
var stat = words.Distinct().ToDictionary(word => word, word => words.Count(x => x == word));
foreach (var (key, value) in stat) Debug.WriteLine($"Word: {key} count: {value}");