You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: base_query.rb
    path of file: ./repos/capybara/lib/capybara/queries
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Capybara
  # @api private
  module Queries
    class BaseQuery
      COUNT_KEYS = %i[count minimum maximum between].freeze


    
      def count_message
        message = +''
        count, between, maximum, minimum = options.values_at(:count, :between, :maximum, :minimum)
        if count
          message << " #{occurrences count}"
        elsif between
          message << " between #{between.begin ? between.first : 1} and " \
                     "#{between.end ? between.last : 'infinite'} times"
        elsif maximum
          message << " at most #{occurrences maximum}"
        elsif minimum
          message << " at least #{occurrences minimum}"
        end