Added a keyword counter function.