MongoLink`
MongoLink`

MongoCollectionCount

MongoCollectionCount[MongoCollection[]]

counts the number of documents in MongoCollection.

MongoCollectionCount[MongoCollection[], query]

counts the number of documents in MongoCollection matching the query query.

Details

Examples

Basic Examples  (1)

In[1]:=
Click for copyable input

Connect to a client:

In[1]:=
Click for copyable input
Out[1]=

Connect to a the "WolframTestCollection" collection in the "WolframTestDB" database:

In[1]:=
Click for copyable input
Out[1]=

Count the number of documents in the collection:

In[1]:=
Click for copyable input
Out[1]=

Count the number of documents in the collection that match the query <|"sex""female"|>:

In[1]:=
Click for copyable input
Out[1]=