public function getCount($Table = '', $Where = false)
{
if ($Table != '') {
//$this->MapAliases($Table);
$this->from($Table);
}
if ($Where !== false) {
$this->where($Where);
}
$this->select('*', 'count', 'RowCount');
// count * slow on innodb
$Sql = $this->getSelect();
$Result = $this->query($Sql);
$CountData = $Result->firstRow();
return $CountData->RowCount;
}