check that correct number of tags are supplied