doc parsing finding number of words and Selenium debugging