added global word counter