def compress(strand: str) -> str:
    """
    This function takes the DNA Strand  with the read of the sequencer and encodes it replacing repeated
    nucleotides with the number of repetitions followed by the repeated nucleotide. For example, given an input of
    "TTTAGGTC" the program should output "3TA2GTC".

    Args:
        strand (str): Full DNA sequence.

    Returns:
        str: Compressed DNA sequence.
    """
    result = []
    counter = 1
    current = strand[0]

    for i in range(1, len(strand) + 1):
        if i < len(strand):
            if strand[i] == current:
                counter += 1
                continue

        if counter == 1:
            result.append(current)
        else:
            result.append(str(counter))
            result.append(current)
            counter = 1

        if i < len(strand):
            current = strand[i]

    return ''.join(result)