Count words in a document robustly | Microsoft