Implemented method to get total number of tags