You can try this also
int WordsCount = CharCount = LinesCount = 0;
string FilePath = "your file path here";
string FileText = new System.IO.StreamReader(FilePath).ReadToEnd().Replace("\r\n", "\r");
CharCount = FileText.Length;
LinesCount = FileText.Split('\r').Length;
WordsCount = FileText.Split(' ').Length;