Hi Billy,
the only reads that are filtered out for gene counting are multimappers. To exclude them from the SAM file you need to use -q 256.
Note that for paired-end reads STAR count the fragments (i.e. pairs), while samtools counts lines (i.e. mates), so you would need to divide samtools counts by 2 (unless you allow single-end alignments, which makes the counting with samtools more complicated, see my response to the previous post).
If this does not help, please send me a minimal example (BAM file and ReadsPerGene.out.tab) that reproduces this discrepancy.
Cheers
Alex