getTagsCount rewrite