def numModels(self, swarmId=None, includeHidden=False):
<EOL>if includeHidden:<EOL><INDENT>if swarmId is None:<EOL><INDENT>return len(self._allResults)<EOL><DEDENT>else:<EOL><INDENT>return len(self._swarmIdToIndexes.get(swarmId, []))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if swarmId is None:<EOL><INDENT>entries = self._allResults<EOL><DEDENT>else:<EOL><INDENT>entries = [self._allResults[entryIdx]<EOL>for entryIdx in self._swarmIdToIndexes.get(swarmId,[])]<EOL><DEDENT>return len([entry for entry in entries if not entry['<STR_LIT>']])<EOL><DEDENT>
Return the total # of models we have in our database (if swarmId is
        None) or in a specific swarm.

        Parameters:
        ---------------------------------------------------------------------
        swarmId:        A string representation of the sorted list of encoders
                        in this swarm. For example '__address_encoder.__gym_encoder'
        includeHidden:  If False, this will only return the number of models
                        that are not hidden (i.e. orphanned, etc.)
        retval:  numModels