Refactor tag link count updating