Fix the logic that calculates the number of CIGAR entries when match "M" entries are expanded into "=" and "X". The number of entries depends not on the number of mismatches but rather on the number of transitions between "=" to "X".