def num_sequences(fileh):
if type(fileh).__name__ == "<STR_LIT:str>":<EOL><INDENT>fh = open(fileh)<EOL><DEDENT>else:<EOL><INDENT>fh = fileh<EOL><DEDENT>count = <NUM_LIT:0><EOL>for _ in fastaIterator(fh):<EOL><INDENT>count += <NUM_LIT:1><EOL><DEDENT>return count<EOL>
Determine how many sequences there are in fasta file/stream.

:param fileh: the stream to read the fasta data from, or a string giving
              the filename of the file to load. Note that if a stream is
              given, it will be consumed by this function
:return: the number of sequences in this fasta stream/file