def nseqs(filename):
    """Extract the number of rows in the file.

    Note however, that this is a simplification
    that might not always work. In general, one would
    need to parse for '>' occurrences.
    """
    return sum(1 for line in open(filename) if line[0] == '>')
