#include <bits/stdc++.h>
using namespace std;
int main() {
  long t;
  cin >> t;
  for (long i = 0; i < t; i++) {
    long n;
    cin >> n;
    map<long, long> groups;
    for (long j = 0; j < n; j++) {
      long a;
      cin >> a;
      groups[a]++;
    }
    long sum = 0;
    for (long k = 0; k <= n; k++) {
      if (groups[k] > 0) {
        sum += groups[k] / k;
        groups[k + 1] += groups[k] % k;
      }
    }
    cout << sum << endl;
  }
}
