Hi Varun,
STAR compares the strand of the the 1st read mapped to the genome, and the strand of the annotations.
If the strands agree, the reads is counted in the 3rd column, if not - in the 4th column.
Depending on the strandedness of the protocol, one of these columns will be counting reads in the sense direction, and the other in the antisense.
To count reads overlapping introns, you would need to create a GTF file with introns coordinates, e.g. (tab-spaced before gene_id)
chr1 myIntrons feature 3073253 3074322 . + . gene_id "intron1"; transcript_id "intron1"
chr1 myIntrons feature 3075858 3079636 . + . gene_id "intron2"; transcript_id "intron2"
gene_id and transcript_id have to be unique for each intron.
Then you can map with
--sjdbGTFfile introns.gtf --sjdbGTFfeatureExon feature
to get counts per intron.
Note that only 1-base overlap is required for counting, so reads overlapping exon/intron boundaries will be counted.
However, reads mapping to regions of overlapping introns (alternatively spliced) will be counted as ambiguous.
I can probably think of some tricks to avoid these behaviors.
Cheers
Alex