lib/eep.fn.stats.js
function CountFunction(win) {
  var self = this, n;
  self.name = "count";
  self.type = "simple";
  self.init = function() { n = 0; };
  self.accumulate = function(ignored) { n += 1; };
  self.compensate = function(ignored) { n -= 1; };
  self.emit = function()  { return n; };
  self.make = function(win) { return new CountFunction(win); };
}
function CountFunction(win) {
  var self = this, n;
  self.name = "count";
  self.type = "simple";
  self.init = function() { n = 0; };
  self.accumulate = function(ignored) { n += 1; };
  self.compensate = function(ignored) { n -= 1; };
  self.emit = function()  { return n; };
  self.make = function(win) { return new CountFunction(win); };
}
function CountFunction ( win ) { var self = this , n ; self . name = "count" ; self . type = "simple" ; self . init = function ( ) { n = 0 ; } ; self . accumulate = function ( ignored ) { n += 1 ; } ; self . compensate = function ( ignored ) { n -= 1 ; } ; self . emit = function ( ) { return n ; } ; self . make = function ( win ) { return new CountFunction ( win ) ; } ; }
Count all the things
Count all the things