public function size() { $count = 0; foreach ($this->identityMap as $documentSet) { $count += count($documentSet); } return $count; }