public function countEvents() { $count = 0; foreach ($this->listEvents() as $dayevents) { $count += count($dayevents); } return $count; }