public function countBanLogEntries(): int
    {
        $this->db->qb([
            'table' => 'core_bans',
            'fields' => 'COUNT(ip)',
            'filter' => 'ip=:ip AND logstamp+:ttl > :expires AND code>0',
            'params' => [
                ':ip' => $this->ip,
                ':ttl' => $this->ttl_banlog_entry,
                ':expires' => time()
            ]
        ]);

        return $this->db->value();
    }