protected function getStopWordThresholdValue()
    {
        if ($this->stopWordThresholdValue !== null) {
            return $this->stopWordThresholdValue;
        }

        // Cached value does not exists, do a simple count query on ezcontentobject table
        $query = $this->dbHandler->createSelectQuery();
        $query
            ->select(
                $query->alias($query->expr->count('*'), 'count')
            )
            ->from($this->dbHandler->quoteTable('ezcontentobject'));

        $statement = $query->prepare();
        $statement->execute();

        // Calculate the int stopWordThresholdValue based on count (first column) * factor
        return $this->stopWordThresholdValue =
            (int)($statement->fetchColumn() * $this->configuration['stopWordThresholdFactor']);
    }