Replace tags array with the number of tags.