Is instance number used to collect dicom series?

The library (GDCM/ITK) should do the sorting for you. Have you tried it? If it does not work, and you need to provide the tag, there are many possible options.