fixed a bug on residue_min and residue_max
(better handling of residue shift in count file)
fixed a typo in run_demo2.sh