public function outCount() { $keyTo = $this->makeKeyLabel($this->to); return Model::GraphJoin()->where(['type', '=', $this->ns])->where(['from', '=', $keyTo])->where(['from_id', '=', (int) $this->to->id])->count(); }