adding prelim code for getting tag counts