building forward index
counting frequencies