Added retrieving  terms count.