def get_counts(filename):
    """
    reads the .counts_edit file and extracts the counts
    :param filename: counts file (original or simulated)
    :return: list of counts
    """
    with open(filename, "r") as counts_file:
        counts = []
        for line in counts_file:
            line = line.strip()
            if line.startswith('>'):  # taxa name
                continue
            else:
                if line=="x" or line=="X":  # discard counts with x
                    continue
                counts.append(int(line))
    return counts