def count(self, *args, **kwargs):
search = self.create_search(*args, **kwargs)<EOL>try:<EOL><INDENT>return search.count()<EOL><DEDENT>except NotFoundError:<EOL><INDENT>print_error("<STR_LIT>")<EOL><DEDENT>except (ConnectionError, TransportError):<EOL><INDENT>print_error("<STR_LIT>")<EOL><DEDENT>
Returns the number of results after filtering with the given arguments.