count number of words defined