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

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

        return $count;
    }
public function size ( ) { $ count = 0 ; foreach ( $ this -> identityMap as $ documentSet ) { $ count += count ( $ documentSet ) ; } return $ count ; }
Calculates the size of the UnitOfWork. The size of the UnitOfWork is the
number of documents in the identity map.

@return int
Calculates the size of the UnitOfWork . The size of the UnitOfWork is the number of documents in the identity map .