#include <bits/stdc++.h>
using namespace std;
long long r;
int main() {
  int t;
  cin >> t;
  for (int j = 0; j < t; j++) {
    int n;
    map<int, int> a;
    cin >> n;
    int b[n];
    for (int i = 0; i < n; i++) {
      cin >> b[i];
      a[b[i]]++;
    }
    int s = 0;
    for (int i = 0; i < n; i++) {
      s += a[b[i]] / b[i];
      a[b[i]] = a[b[i]] % b[i];
    }
    int temp = 0;
    for (pair<int, int> k : a) {
      temp = k.second + temp;
      if (temp >= k.first) {
        s++;
        temp = temp - k.first;
      }
    }
    cout << s << "\n";
  }
}
