# Use an empty mongo.bson for the query object which matches everything.
# This happens to be the default value for the query
# parameter to mongo.count, but we explicity use mongo.bson.empty()
# here for an example.
mongo <- mongo.create()
if (mongo.is.connected(mongo))
print(mongo.count(mongo, "test.people", query=mongo.bson.empty()))
Run the code above in your browser using DataLab