Bugfix for counting tags.