nInserted property
The number of documents inserted, excluding upserted documents. See nUpserted for the number of documents inserted through an upsert.
Implementation
int nInserted = 0;
The number of documents inserted, excluding upserted documents. See nUpserted for the number of documents inserted through an upsert.
int nInserted = 0;