final public function countByColumn($column, $value, $field = null)
    {
        $this->validateShortcutData();
        $alias = 'count';

        if ($field === null) {
            $field = $this->getPk();
        }

        return (int) $this->db->select()
                            ->count($field, $alias)
                            ->from(static::getTableName())
                            ->whereEquals($column, $value)
                            ->query($alias);
    }
final public function countByColumn($column, $value, $field = null)
    {
        $this->validateShortcutData();
        $alias = 'count';

        if ($field === null) {
            $field = $this->getPk();
        }

        return (int) $this->db->select()
                            ->count($field, $alias)
                            ->from(static::getTableName())
                            ->whereEquals($column, $value)
                            ->query($alias);
    }
final public function countByColumn ( $ column , $ value , $ field = null ) { $ this -> validateShortcutData ( ) ; $ alias = 'count' ; if ( $ field === null ) { $ field = $ this -> getPk ( ) ; } return ( int ) $ this -> db -> select ( ) -> count ( $ field , $ alias ) -> from ( static :: getTableName ( ) ) -> whereEquals ( $ column , $ value ) -> query ( $ alias ) ; }
Counts by provided column's value

@param string $column
@param string $value
@param string $field Field to be counted. By default the value of PK is taken
@return integer
Counts by provided column s value