MongoCollection.GetNextSerial (gb.mongodb)

Function GetNextSerial ( ) As Integer

Return the next serial number associated with the collection, starting from 1.

This is implemented through a special collection named "__serial" that stores the last serial number for each database collection.