Counting words and filling up a div