title: Array Range Queries Elements Frequency Value
signature: function array_range_queries_elements_frequency_value(start, end_arg1, arr)
source_py: def array_range_queries_elements_frequency_value(start, end, arr):
      frequency = dict()
      for i in range(start, (end + 1)):
          if (arr[i] in frequency.keys()):
              frequency[arr[i]] += 1
          else:
              frequency[arr[i]] = 1
      count = 0
      for x in frequency:
          if (x == frequency[x]):
              count += 1
      return count
source_cpp: int array_range_queries_elements_frequency_value(int start, int end, vector<int> arr) {
    unordered_map < int, int > frequency;
    for ( int i = start;
    i <= end;
    i ++ ) frequency [ arr [ i ] ] ++;
    int count = 0;
    for ( auto x : frequency ) if ( x . first == x . second ) count ++;
    return count;
  }