I am looking for a good word count class or function. When I copy and paste something from the internet and compare it with my custom word count algorithm and MS Word it is
Use a regular expression to find words (e.g. [\w]+) and just count the matches
public static Regex regex = new Regex( "[\\w]+", RegexOptions.Multiline | RegexOptions.CultureInvariant | RegexOptions.Compiled );
regex.Match(_someString).Count