<p>Given a <a href='http://samtools.sourceforge.net/SAM1.pdf'>sam</a> file which was produced by using <a href='http://bio-bwa.sourceforge.net/'>bwa</a> to align a fastq of reads to a reference genome, how can I enumerate the number of reads which were assigned to each chromosome of the reference genome?</p>

Your question refers to SAM format, but in the event that you may also have a sorted/indexed BAM, you can simply do the following to get this very quickly.

    samtools idxstats aln.bam | cut -f 1,3