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: field_extension.rb
    path of file: ./repos/gitlabhq/lib/gitlab/graphql/calls_gitaly
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Gitlab
  module Graphql
    module CallsGitaly
      # Check if any `calls_gitaly: true` declarations need to be added
      #
      # See Bas
    
        def value_with_count(value, (previous_count, previous_accounted_for))
          newly_accounted_for = accounted_for - previous_accounted_for
          value = force(value)
          count = [current_gitaly_call_count - (previous_count + newly_accounted_for), 0].max

          [value, count]
        end