Count files using htseq-count?
I m not sure about htseq-counts but I would suggest go for featureCounts, I will update my answer and share the script/command. Give it a try 

the command i use 

featureCounts -T 50 -C -p -t exon -g gene_id -a /run/media/data2/gencode.v21.annotation.gtf  -o PRIMARY_CELL.txt $(ls *.bam | sort )