public function getUpsertedCount() { if ($this->isAcknowledged) { return $this->writeResult->getUpsertedCount(); } throw BadMethodCallException::unacknowledgedWriteResultAccess(__METHOD__); }