public function count()
    {
        if ($this->getWalkFlag() & self::WALK_X) {
            return $this->countX();
        } elseif ($this->getWalkFlag() & self::WALK_Y) {
            return $this->countY();
        } else {
            return $this->countXY();
        }
    }