Thank you very much for your answers but all this becomes more and more unclear (too bad, because the reading of the flagstat report was already enough unclear to understand). If you say that a read may have have primary and secondary or multiple alignment, then why the sum of the primary, secondary and supplementary reads is exactly equal to the total number of input reads?
In a more general way, how is it possible to define that a read is primary, secondary or supplementary before the mapping? And why after mapping the number of reads primary mapped is in fact different form the number of input primary reads?
I think that I mistake the terms "primary" and "uniquely".
here is my flagstat report to help you to understand:
2042633 + 0 in total (QC-passed reads + QC-failed reads)
1237849 + 0 primary
539335 + 0 secondary
265449 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
1757582 + 0 mapped (86.04% : N/A)
952798 + 0 primary mapped (76.97% : N/A)
Check the SAM file format specification (search for primary/secondary) to get the info: https://samtools.github.io/hts-specs/SAMv1.pdf