class RSpec::Matchers::BuiltIn::Include

def count_inclusions

def count_inclusions
  @divergent_items = expected
  case actual
  when String
    actual.scan(expected.first).length
  when Enumerable
    count_enumerable(Hash === expected ? expected : expected.first)
  else
    raise NotImplementedError, 'Count constraints are implemented for Enumerable and String values only'
  end
end