Question: extract the number of reads around TSS
$ bedmap --echo --count TSSs.bed <(sam2bed < reads.sam) > answer.bed
If you want to pad the TSSs, say by 1k bases on both sides, add the
--range N option:
$ bedmap --echo --count --range 1000 TSSs.bed <(sam2bed < reads.sam) > answer.bed
This will likely increase the number of overlaps between reads and (padded) TSSs.