Added countEqualAdjacentPairs