def count(fasta):
    """Count sequences in an open FASTA file handle.

    Iterates each line, and counts header lines (start with `>`). Then, seeks to start
    of the file and returns the count.

    Parameters
    ----------
    fasta : open file handle
        An open file handle corresponding to a FASTA file.

    Returns
    -------
    count : int
        Total number of sequences in the file.
    """
    count = 0
    for line in fasta:
        if line.startswith('>'):
            count += 1
    fasta.seek(0)
    return count
