Define nelements for MongoDB