// gets all the documents in the pets collection:
db.pets.find();

counts the # of documents in the query preceding the .count();
db.pets.find().count();


// returns all pets where the "sex" property has the value of "male"
db.pets.find(
    {
        sex: "male"
    }
);


// returns the number of documents that match the current filter:
db.pets.find(
    {
        sex: "male"
    }
).count();


// returns only records where sex is male AND type is dog
db.pets.find(
    {
        sex: "male",
        type: "dog"
    }
)