Counts frequences of words