added counter for keyword length