'Limit the number of returned documents to `n`. This may also be
achieved using array-slicing syntax (e.g. ``User.objects[:5]``).
:param n: the maximum number of objects to return'

def limit(self, n):

    queryset = self.clone()
    queryset._limit = (n if (n != 0) else 1)
    if queryset._cursor_obj:
        queryset._cursor_obj.limit(queryset._limit)
    return queryset
