Stef, it's only going to replace the number following the _ character with a new one, so if the first few labels were:
1.2323.1_20 <remainder of header>
1.412.2_100 <remainder of header>
1.2323.1_20 <remainder of header>
The output should be
1.2323.1_0 <remainder of header>
1.412.2_1 <remainder of header>
1.2323.1_2 <remainder of header>
The SampleIDs are specified in your mapping file, so when you run split_libraries.py or split_libraries_fastq.py, it should be using the barcode that it identifies to match up the SampleID and write out whichever ID is there. It will probably be easier if you go back to the split_libaries step, make sure your Mapping file has the SampleIDs that you want, and rerun it there to get the right IDs and unique numbers following the underscores after the IDs. If you have to call split_libaries multiple, independent times, you want to use the -n parameter to give it a new starting number each time, e.g. -n 1000000 the first call, -n 2000000 the second and so on (much larger numbers if you are demultiplexing Illumina data).