<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def count_concordant(self, aligned_bam):
 """ Count only reads that "aligned concordantly exactly 1 time." :param str aligned_bam: File for which to count mapped reads. """

        cmd = self.tools.samtools + " view " + aligned_bam + " | "
        cmd += "grep 'YT:Z:CP'" + " | uniq -u | wc -l | sed -E 's/^[[:space:]]+//'"
        
        return subprocess.check_output(cmd, shell=True)