docs: function buildCountStatement(requestQuery) {
          var dateSql = buildDatePartial();
          var result;
          if(self.sGroupBySql.length) {
              result = "SELECT COUNT(*) FROM (";
              result += "SELECT COUNT(" + self.sGroupBySql[0] + ") FROM ";
              result += self.sFromSql ? self.sFromSql : self.sTableName;
              result += buildWherePartial(requestQuery);
              result += buildGroupByPartial();
              result += ") temp";
          } else {
              result = "SELECT COUNT(";
              result += self.sSelectSql ? "*" : (self.sCountColumnName ? self.sCountColumnName : "id");
              result += ") FROM ";
              result += self.sFromSql ? self.sFromSql : self.sTableName;
              result += buildWherePartial(requestQuery);
          }
  //        var sSearchQuery = buildSearchPartial( sSearchString );
  //        var sWheres = sSearchQuery ? [ sSearchQuery ] : [];
  //        if( self.sWhereAndSql )
  //            sWheres.push( self.sWhereAndSql )
  //        if( dateSql )
  //            sWheres.push( dateSql );
  //        if( sWheres.length )
  //            result += " WHERE (" + sWheres.join( ") AND (" ) + ")";
          return result;
      }