Count records in a collection

Returns the number of records stored in the specified collection.