docs: function (cb) {
  
                  req.linz.model.getCount(req, query, function (err, countQuery) {
  
                      if (err) {
                          return cb(err);
                      }
  
                      countQuery.exec(function (countQueryErr, count) {
  
                          // A query error has occured, let's short circuit this entire process
                          // and start again from the last known working state.
                          if (countQueryErr) {
                              return handleQueryError(countQueryErr);
                          }
  
                          if (!countQueryErr && count === 0) {
                              return cb(new Error('No records found'));
                          }
  
                          if (!countQueryErr) {
                              totalRecords = count;
                          }
  
                          return cb(countQueryErr);
  
                      });
  
  
                  });
  
              }