add function countComments()