lib/dataset/actions.js
function (cb) {
            return this.__aggregateDataset().get(sql.COUNT(sql.literal("*")).as("count")).chain(function (res) {
                return parseInt(res, 10);
            }).classic(cb);
        }
function (cb) {
            return this.__aggregateDataset().get(sql.COUNT(sql.literal("*")).as("count")).chain(function (res) {
                return parseInt(res, 10);
            }).classic(cb);
        }
function ( cb ) { return this . __aggregateDataset ( ) . get ( sql . COUNT ( sql . literal ( "*" ) ) . as ( "count" ) ) . chain ( function ( res ) { return parseInt ( res , 10 ) ; } ) . classic ( cb ) ; }
Returns a promise that is resolved with the number of records in the dataset.

@example

// SELECT COUNT(*) AS count FROM table LIMIT 1
DB.from("table").count().chain(function(count){
//count === 3;
});

@param {Function} [cb] the callback to invoke when the action is done.

@return {comb.Promise} a promise that is resolved with the the number of records in the dataset.
Returns a promise that is resolved with the number of records in the dataset .