docs: function( key, options, callback ){
      var self = this;
      var select = 'select count(*) as count from "'+key+'"';
      if ( options.where ){
        if ( options.where != '1=1'){
          var clause = this.createWhereFromSql(options.where);
          select += ' WHERE ' + clause;
        } else {
          select += ' WHERE ' + options.where;
        }
      }
  
      if ( options.geometry ){
        var geom = this.parseGeometry( options.geometry );
  
        if (geom.xmin && geom.ymin ){
          var box = geom;
          if (box.spatialReference.wkid != 4326){
            var mins = merc.inverse( [box.xmin, box.ymin] ),
              maxs = merc.inverse( [box.xmax, box.ymax] );
            box.xmin = mins[0];
            box.ymin = mins[1];
            box.xmax = maxs[0];
            box.ymax = maxs[1];
          }
  
          select += (options.where ) ? ' AND ' : ' WHERE ';
          var bbox = box.xmin+' '+box.ymin+','+box.xmax+' '+box.ymax;
          //select += 'geom && ST_SetSRID(\'BOX3D('+bbox+')\'::box3d,4326)';
          select += 'ST_GeomFromGeoJSON(feature->>\'geometry\') && ST_SetSRID(\'BOX3D('+bbox+')\'::box3d,4326)';
        }
      }
  
      this._query(select, function(err, result){
        if ( err || !result || !result.rows || !result.rows.length ){
          callback('Key Not Found ' + key, null);
        } else {
          self.log.debug('Get Count', result.rows[0].count, select);
          callback(null, parseInt(result.rows[0].count));
        }
      });
    }