Retrieve information about documents, collections, and
indexes in the current namespace. Unavailable values are set to -1.
Syntax diagram


Example
Example 1: Show statistics for this
namespace.
db.stats()
Sample output:
{
"collections": 3,
"objects": 15328,
"indexes": 5
}