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
You also need to check for newlines, tabs, and non-breaking spaces. I find it best to copy the source text into a StringBuilder and replace all newlines, tabs, and sentence ending characters with spaces. Then split the string based on spaces.