Return the number of games of the day

@return int
Number of games for the day
439759
public function getNbGame() : int {
    $query = \Drupal::entityQuery('game')->condition('day', $this->id());
    $ids = $query->execute();
    return count($ids);
  }
1025766
protected function getTotalCount()
    {
        $query = $this->modelRepository->query();

        $this->applyListParentToQuery($query);

        return $query->count();
    }
570824
public function toEpochDay() : int
    {
        $y = $this->year;
        $m = $this->month;

        $total = 365 * $y;

        if ($y >= 0) {
            $total += \intdiv($y + 3, 4) - \intdiv($y + 99, 100) + \intdiv($y + 399, 400);
        } else {
            $total -= \intdiv($y, -4) - \intdiv($y, -100) + \intdiv($y, -400);
        }

        $total += \intdiv(367 * $m - 362, 12);
        $total += $this->day - 1;

        if ($m > 2) {
            $total--;
            if (! $this->isLeapYear()) {
                $total--;
            }
        }

        return $total - self::DAYS_0000_TO_1970;
    }
1109463
public function getNumberOfPlayers($gameId = null)
    {
        $em = $this->getServiceManager()->get('doctrine.entitymanager.orm_default');
        $rsm = new \Doctrine\ORM\Query\ResultSetMapping;
        $rsm->addScalarResult('c', 'c');
        if ($gameId !== null) {
            $game = $this->getServiceManager()
                ->get('playgroundgame_lottery_service')
                ->getGameMapper()
                ->findById($gameId);

            if ($game && $game->getAnonymousAllowed()) {
                $query = $em->createNativeQuery('
                    SELECT COUNT(distinct e.anonymous_identifier) AS c
                    FROM game_entry e
                    WHERE e.game_id = '.((int) $gameId).'
                ', $rsm);
            } else {
                $query = $em->createNativeQuery('
                    SELECT COUNT(distinct e.user_id) AS c
                    FROM game_entry e
                    WHERE e.game_id = '.((int) $gameId).'
                ', $rsm);
            }
        } else {
            $query = $em->createNativeQuery('
                    SELECT COUNT(distinct e.user_id) AS c
                    FROM game_entry e
                ', $rsm);
        }
        
        $count = $query->getSingleScalarResult();
        return $count;
    }
1110819
public static function getDays() {
        $days = array();
        for ($i = 1; $i <= 31; $i++) {
            if ($i < 10)
                $days[$i] = '0' . $i;
            else
                $days[$i] = $i;
        }
        return $days;
    }
1146030
public static function getWeekdays() {
		return array(
			self::MONDAY,
			self::TUESDAY,
			self::WEDNESDAY,
			self::THURSDAY,
			self::FRIDAY,
			self::SATURDAY,
			self::SUNDAY,
		);
	}
440690
public function count() {
		if(!$this->initialized)
			$this->initialize();

		return count($this->elements) - count($this->toRemove) + count($this->toAdd);
	}
575915
public function getBets() {
    $query = \Drupal::entityQuery('bet');
    $query->condition('game', $this->id());
    $games_ids = $query->execute();
    return Bet::loadMultiple($games_ids);
  }
1080743
public function getDays() {
    $query = \Drupal::entityQuery('day');
    $query->condition('league', $this->id());
    $query->sort('id', 'ASC');
    $ids = $query->execute();

    return Day::loadMultiple($ids);
  }
607640
public function getTotal()
    {
        if (is_null($this->_total)) {
            if (($total = $this->predictTotal())) {
                $this->_total = $total;
            } elseif (isset($this->_items)) {
                return count($this->_items);
            } else {
                $this->_total = false;
            }
        }

        return $this->_total;
    }
522382
public function getReleaseTime() : int
    {
        $query = 'SELECT release_time FROM info LIMIT 1';

        $releaseTime = 0;
        foreach ($this->getAdapter()->query($query) as $row) {
            $releaseTime = (int)$row['release_time'];
        }

        return $releaseTime;
    }
653585
public function getDays()
    {
        $days = array();
        foreach ($this->getDatePeriod() as $date) {
            $days[] = $this->getFactory()->createDay($date);
        }

        return $days;
    }
801088
public function count()
    {
        if ($this->number !== null) {
            return $this->number;
        }

        $this->number = (int) $this->store->get($this->key);

        if (!$this->number) {
            $this->number = 0;
        }

        return $this->number;
    }
193431
public function getNbResults()
    {
        if (isset($this->nbResults)) {
            return $this->nbResults;
        }

        $countQuery = clone $this->query;
        $countQuery->limit = 0;

        return $this->nbResults = $this->findService->findNodes($countQuery)->totalCount;
    }
536195
public function getNumberOfItemSlots(): int
    {
        if ($this->numberOfItemSlots === self::VALUE_UNLIMITED_SLOTS_DATABASE) {
            $result = self::VALUE_UNLIMITED_SLOTS;
        } else {
            $result = $this->numberOfItemSlots;
        }
        return $result;
    }
908656
public static function count(/* ... */)
	{
		$args = func_get_args();
		$options = static::extractAndValidateOptions($args);
		$options['select'] = 'COUNT(*)';

		if (!empty($args) && !is_null($args[0]) && !empty($args[0]))
		{
			if (is_hash($args[0]))
				$options['conditions'] = $args[0];
			else
				$options['conditions'] = call_user_func_array('static::pk_conditions',$args);
		}

		$table = static::table();
		$sql = $table->options_to_sql($options);
		$values = $sql->get_where_values();
		return static::connection()->query_and_fetch_one($sql->to_s(),$values);
	}
89127
public function num_rows()
	{
		return is_int($this->num_rows)
			? $this->num_rows
			: $this->num_rows = @sqlite_num_rows($this->result_id);
	}