protected function prepareCountQuery()
    {
        $builder = clone $this->query;

        if (! $this->isComplexQuery($builder)) {
            $row_count = $this->wrap('row_count');
            $builder->select($this->connection->raw("'1' as {$row_count}"));
            if (! $this->keepSelectBindings) {
                $builder->setBindings([], 'select');
            }
        }

        return $builder;
    }