documents[] = $document; } /** * Returns how many items have been added to this batch * * @return int How many operations are total in this batch object */ public function count() { return count($this->documents); } }