Use slices instead of skip and limit with mongoengine queryset
Clone queryset before count() to avoid deepcopy error