added sam2counts.R