class_docstr: Non permanent collection
  
  This collection is meant for debugging purposes within the EphemeralDB.
  
  .. seealso:: :class:`orion.core.io.database.ephemeraldb.EphemeralDB` for database object.
class_docstr_tok: ["Non","permanent","collection","This","collection","is","meant","for","debugging","purposes","within","the","EphemeralDB",".","..","seealso",":",":",":","class",":","`","orion.core.io.database.ephemeraldb.EphemeralDB","`","for","database","object","."]
docstr: Count the number of documents in a collection which match the `query`.
  
  .. seealso:: :meth:`orion.core.io.database.Database.count` for argument documentation.
docstr_tok: ["Count","the","number","of","documents","in","a","collection","which","match","the","`","query","`",".","..","seealso",":",":",":","meth",":","`","orion.core.io.database.Database.count","`","for","argument","documentation","."]
code: def count(self, query=None):
      """Count the number of documents in a collection which match the `query`.
  
      .. seealso:: :meth:`orion.core.io.database.Database.count` for argument documentation.
  
      """
      return len(self.find(query))
  
imports: import copy
  from collections import defaultdict
  from orion.core.io.database import Database, DatabaseError, DuplicateKeyError
  from orion.core.utils.flatten import flatten, unflatten
label_desc: Use image node_id 12 for calling the EphemeralCollection obj's underlying member method code with example usage: obj.count(query) and returns: len