Counts the words when opening the book