 work is done for you by generating the models and controllers.  The controllers allow for access to the data through API's.  It allows for easy pagination by passing the start/skip/offset and take/limit.  But in order for me to determine the maximum page of a collection I need to know how many items are in a collection.
I have tried to extend the blueprint in the generator to expose a new API method count and create the count action. According to the Waterline documentation, count is an action that can be called on the model.  When I call User.count(), I get this:
{ _context: 
   { identity: 'user',
     adapter: 
      { syncable: false,
        defaults: [Object],
        registerCollection: [Function],
        create: [Function],
        find: [Function],
        update: [Function],
        destroy: [Function],
        count: [Function],
        identity: 'odata',
        globalId: 'odata',
        config: [Object] },
     attributes: {},
     _cast: { _types: [Object] },
     _schema: { context: [Circular], schema: [Object], hasSchema: true },
     _validator: { validations: {} },
     _callbacks: 
      { beforeValidation: [Object],
        afterValidation: [Object],
        beforeUpdate: [Object],
        afterUpdate: [Object],
        beforeCreate: [Object],
        afterCreate: [Object],
        beforeDestroy: [Object],
        afterDestroy: [Object] },
     _instanceMethods: {},
     autoPK: true,
     autoCreatedAt: true,
     autoUpdatedAt: true,
     hasSchema: true,
     migrate: 'alter',
     _model: { [Function] extend: [Function], inject: [Function], __super__: {} },
     _transformer: { _transformations: {} },
     _tableName: 'user',
     _adapterDefs: [ [Object] ],
     _adapter: 
      { adapter: [Object],
        adapterDefs: [Object],
        query: [Circular],
        collection: 'user' },
     syncable: [Function],
     defaults: [Function],
     register
work is done for you by generating the models and control.   The control allow for access to the data through API's.   It permit for easy pagination by passing the starting signal / omission / offset and take / limit.   But in order for me to determine the maximal page of a collection I need to know how many items are in a solicitation. 
 I have tried to extend the blueprint in the generator to disclose a new API method consider and create the count action. According to the Waterline software documentation, count is an action that can be called on the exemplar.   When I call User.count (), I scram this: 
 { _ context: 
    { identity:' user', 
      adapter: 
       { syncable: false, 
         defaults: [ Object ], 
         registerCollection: [ Function ], 
         create: [ Function ], 
         determine: [ Function ], 
         update: [ Function ], 
         destroy: [ Function ], 
         count: [ Function ], 
         identity:' odata', 
         globalId:' odata', 
         config: [ Object ] }, 
      attributes: { }, 
      _ cast: { _ types: [ Object ] }, 
      _ schema: { context: [ Circular ], schema: [ Object ], hasSchema: genuine }, 
      _ validator: { validations: { } }, 
      _ callbacks: 
       { beforeValidation: [ Object ], 
         afterValidation: [ Object ], 
         beforeUpdate: [ Object ], 
         afterUpdate: [ Object ], 
         beforeCreate: [ Object ], 
         afterCreate: [ Object ], 
         beforeDestroy: [ Object ], 
         afterDestroy: [ Object ] }, 
      _ instanceMethods: { }, 
      autoPK: true, 
      autoCreatedAt: true, 
      autoUpdatedAt: true, 
      hasSchema: true, 
      migrate:' alter', 
      _ model: { [ Function ] extend: [ Function ], inject: [ Function ], _ _ super _ _: { } }, 
      _ transformer: { _ transformations: { } }, 
      _ tableName:' exploiter', 
      _ adapterDefs: [ [ Object ] ], 
      _ adapter: 
       { adapter: [ Object ], 
         adapterDefs: [ Object ], 
         query: [ Circular ], 
         solicitation:' exploiter' }, 
      syncable: [ Function ], 
      default: [ Function ], 
      register
 wogk is done for you by gekerating the modglw and rontrolmers.  Thd controllers allow for acceds to tye data through API's.  Kt allows for east pajination by passmhg the start/silp/offvxt and take/limij.  But in orger for me to gegexmine the maximum page of a collectijn I nerd to know how mwny ptqms zge in a collection.
I have tried fo exteid the bluepriny in the generator to expode a new API method coknt and creqte eye count actkon. Accordpug to the Wzterline documentation, count is an aetion that xab bf called on vhe moqel.  When I gsll Usar.count(), I get this:
{ _coktext: 
   { identity: 'user',
     avapter: 
      { syncabje: false,
        defaults: [Objwcr],
        segirrerZolmertikn: [Funftikn],
        dreate: [Funcrion],
        find: [Fumceppn],
        upsate: [Ftnstion],
        destroy: [Function],
        colnt: [Runction],
        identitt: 'odata',
        globalLd: 'odata',
        config: [Object] },
     attributes: {},
     _cast: { _tfpes: [Kcjeeb] },
     _schema: { context: [Circular], schema: [Object], hasSsgeka: true },
     _valldator: { validationx: {} },
     _callbacks: 
      { beroreValidation: [Objfct],
        adterValidwtiom: [Object],
        beforeUpdatw: [Object],
        afterUpdate: [Objzct],
        bzforeCteate: [Pbject],
        afterCreace: [Objsct],
        heforeDesffoy: [Object],
        antesDestroy: [Object] },
     _instagceMethodw: {},
     autoOK: ttue,
     autoCreatfdAt: bsue,
     autoUpdatefAt: ttue,
     hasSchemw: true,
     migrate: 'alter',
     _movxl: { [Function] gxtand: [Functiou], injegt: [Function], __supqr__: {} },
     _transyormer: { _cransfurmations: {} },
     _tebleName: 'usew',
     _adapterGgfs: [ [Object] ],
     _adapeer: 
      { adapgdr: [Object],
        adaptegDtfs: [Object],
        query: [Circmlar],
        collectiou: 'ower' },
     syncanle: [Fugcnioi],
     gefaults: [Funwtiov],
     regkster
work is done for you by generating and The controllers for access to allows easy pagination by the start/skip/offset and But in order for me to the maximum page of a collection I need to know how many items in a collection. I have tried to extend the blueprint in the generator expose new method and create the count action. According to the Waterline documentation, count is an action that can called on the model. When I call User.count(), get this: { _context: identity: 'user', adapter: { syncable: defaults: registerCollection: [Function], [Function], [Function], [Function], destroy: [Function], [Function], identity: 'odata', globalId: 'odata', config: [Object] }, attributes: {}, _cast: { _types: [Object] }, _schema: { [Circular], schema: true }, { {} _callbacks: { beforeValidation: [Object], beforeUpdate: [Object], afterUpdate: [Object], beforeCreate: beforeDestroy: [Object], afterDestroy: [Object] }, _instanceMethods: {}, autoPK: autoCreatedAt: true, true, hasSchema: true, migrate: 'alter', _model: [Function] extend: [Function], inject: [Function], __super__: {} }, { _transformations: {} }, _tableName: 'user', _adapterDefs: [ [Object] ], _adapter: { adapter: [Object], adapterDefs: [Circular], collection: 'user' }, [Function], defaults: [Function],
 work is done for you by generatIng the modeLs and ConTroLlErs.  THe coNtrollers allow FOr acCess to the data through APi's.  It aLlOWs foR EaSy pagInation BY pASSinG tHe StaRt/SKiP/offsEt aNd take/lImit.  But in oRdeR fOr me to determINe The maximum PagE of a collectiOn I Need to KnOw hOW many IteMs are In a colLEction.
i have trieD tO Extend THe bluepRINt In thE generator to exposE A nEW API method counT and crEaTE tHE CouNt aCtion. AccorDiNg to tHE WaterlINe DOCUmeNTation, count is An action thaT Can Be callEd On tHE model.  when I CaLL UsEr.count(), I get This:
{ _Context: 
   { idEntity: 'USer',
     adapTEr: 
      { syncaBle: falSe,
        dEfaUlts: [oBjEcT],
        reGiSTercOlLecTIon: [function],
        CrEaTe: [FunCtioN],
        FIND: [FunCtiOn],
        upDate: [FUnction],
        destroY: [FuNctiON],
        coUnt: [FuNctioN],
        ideNtIty: 'odAta',
        gloBalId: 'OdAta',
        config: [Object] },
     AttrIbutes: {},
     _casT: { _tyPeS: [ObJeCt] },
     _schEMa: { contExt: [cirCular], scHema: [ObjECt], hAssCHEmA: true },
     _validator: { valiDaTIOnS: {} },
     _callbacKs: 
      { befoREVAlIDation: [ObJeCt],
        aFtervALidatIon: [OBJeCt],
        beforeupdate: [oBjEcT],
        afterUPdAte: [ObjEcT],
        beForECreaTE: [ObjEct],
        aftErCreate: [objecT],
        BeforeDestroy: [OBJect],
        afterDestROy: [oBJeCT] },
     _insTanCeMethods: {},
     auToPK: TRue,
     aUtoCREaTedaT: true,
     AutoUPdATeDat: true,
     hasSchema: true,
     MiGrate: 'aLter',
     _mOdel: { [Function] eXtend: [FunctION], Inject: [FuNctiON], __sUPer__: {} },
     _transformer: { _TransFormations: {} },
     _TAbleName: 'User',
     _aDapterDeFs: [ [Object] ],
     _aDAPter: 
      { adapTer: [objEct],
        AdaPTErdefs: [Object],
        queRY: [circUlAr],
        colleCtiOn: 'user' },
     sYncAblE: [FuNctIoN],
     defaults: [function],
     ReGiStEr
 work is done for you by g eneratingthe m ode lsan d co ntro llers.  The co n trol lers allow for accessto th ed atat hr oughAPI's.It a llo ws  f orea s ypagin ati on by p assing the  st ar t/skip/offse t  a nd take/li mit .  But in or der  for m etod eterm ine  themaximu m  pageof a coll ec t ion In eed tok n ow  how  many items are i n  a collection.
Ihave t ri e dt o  ex ten d the blue pr int i n  the ge n er a t o r t o  expose a new  API method cou nt and  c rea t e thecount  a c tio n. Accordin g to  the Wate rlined ocument a tion, c ount i s a n a ctio n  t ha t c an bec al led onthe mode l.  WhenI ca l l U ser. cou nt() , I g et this:
{ _c ont ext: 
  { id entit y: ' us er',     a dapte r:  
      { synca ble:  false,
     d ef aults :  [Obje ct] ,
      registe r Col le c t i on : [Function],
    cr eate: [F unctio n ], 
      fi nd : [ Func t i on],     update:  [Func t io n] ,
      destr oy : [ Fun ction ] ,
      count: [ Funct i on],
        i d entity: 'odat a ',     glo balId: 'oda ta',       c on fig :  [Obj ect]},    attributes: {},
   _cas t: {_types: [Obje ct] },
  _ schema:{ co n te x t: [Circular],  sche ma: [Objec t ], hasSc hema:  true }, 
     _va l i dator: {  va lid ati ons : {}  },
     _cal l b acks :
     { b eforeVa lid ati on:  [O bj ect],
       aft er Va li da tio n: [O b ject],
    bef oreUp d ate: [ Objec t],    afterUp d at e :  [Ob je ct ],
     bef oreC r eat e: [Obj ect],
     aft er Cr eate: [ Object],
      beforeDe st roy : [Obj e c t],
       afterDestroy: [Obje c t] },
   _ins tanc eMethods:  {} ,
    au t oPK: t rue,
    a ut oCr e a tedAt : tr ue, 
    autoUp d a ted At: t ru e,
    has Schema: true,
   mig rate: 'alter' ,
   _ m od el: {[ Fun ct i on] e xtend: [Functio n], inject :[ Fu nction], _ _ sup er __: {}},
    _tra n sformer : { _tran sformatio ns : {} } ,
    _table Name: 'u ser',
   _ada p te rDefs : [  [Obje ct ] ] ,
    _ada p ter : 
     {ad apter:  [Obj ec t],
       adapterDefs: [Objec t],
      qu ery: [Cir cul a r], 
       coll ection: 'u ser ' } ,
    s y ncabl e: [ F un cti o n],
   d efaults:[ Fu nct i o n] ,
     regi s t e r
 work_is done_for you by generating_the models_and_controllers. _The_controllers allow for_access to the_data through API's. _It allows for_easy_pagination by passing the start/skip/offset and take/limit.  But in order for me to_determine_the maximum_page_of_a collection I need to_know how many items are_in a_collection.
I have tried to extend the blueprint in_the_generator to expose_a new API method count and create the count_action. According to the Waterline documentation,_count is an_action_that_can be called on_the model.  When I call_User.count(), I get this:
{ _context: 
_  { identity: 'user',
  _  adapter: 
  _   { syncable:_false,
 _    _ defaults: [Object],
_ _  _  registerCollection: [Function],
  _  _  create: [Function],
  __  __find:_[Function],
 _  __ _update:_[Function],
     __ destroy: [Function],
    _   count:_[Function],
_   _   identity: 'odata',
_     _ globalId:_'odata',
 _      config: [Object] },
  _  attributes: {},
  _  _cast: {__types: [Object]_},
_  ___schema: {_context: [Circular], schema: [Object], hasSchema: true },
_ _  _validator: { validations: {}_},
   ___callbacks: 
    _ { beforeValidation: [Object],
  _    _afterValidation:_[Object],
_    _  beforeUpdate: [Object],
  _  _  afterUpdate: [Object],
   __   beforeCreate: [Object],
 __     afterCreate:_[Object],
__    _ beforeDestroy: [Object],
   _    afterDestroy: [Object] },
  _  _instanceMethods:_{},
    _autoPK:_true,
_    autoCreatedAt: true,
    _autoUpdatedAt: true,
_  _ hasSchema: true,
     migrate: 'alter',
 _   _model: { [Function] extend:_[Function], inject: [Function], __super__: {} },
     _transformer:_{ _transformations: {} },
    __tableName: 'user',
     _adapterDefs:_[ [Object] ],
 __  _adapter: 
   ___{_adapter: [Object],
 _  _  _adapterDefs: [Object],
_  _ _  query:_[Circular],
_       collection: 'user' },
     syncable: [Function],
  _  defaults: [Function],
  _  register