docs: public int getKeyFields(boolean bForceUniqueKey, boolean bIncludeTempFields)
      {
          int iKeyFieldCount = super.getKeyFields(bForceUniqueKey, bIncludeTempFields);
          if (!bIncludeTempFields)
          {
              while (iKeyFieldCount > 0)
              {
                  if (this.getKeyField(iKeyFieldCount - 1).isTemporary())
                      iKeyFieldCount--;
                  else
                      break;
              }
          }
          if (bForceUniqueKey)
              if (this.getUniqueKeyCode() != DBConstants.UNIQUE)
                  if (this.getRecord().getCounterField() == this.getRecord().getKeyArea(0).getField(0))
                      iKeyFieldCount++;
          return iKeyFieldCount;
      }