tiff: in add_string_metadata() check the count more completely