function to count keywords added