My 2p: It's good to keep in mind that SAM/BAM stores alignments not reads (in fact, sam stands for sequence alignment/map) even if unmapped reads can be present.
For this reason the simple question "how many reads have been aligned?" can be tricky to answer. A simple strategy is to count the reads that have not been aligned and get the difference with the raw read count from fastq. But if you want to know how many reads have been aligned with certain criteria (e.g. mapq > x, alignment score > y, properly paired etc) than you should consider also split reads.
I suspect the use of the word "read" in samtools flagstat causes a lot of misunderstandings in this respect.