#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = 1e18;
const long long epi = 1e-9;
int main() {
  long long t, n, i, m, x, g;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<long long> a(n, 0);
    for (i = 0; i < (n); i++) {
      cin >> a[i];
    }
    x = 0, m = 0, g = 0;
    sort(a.begin(), a.end());
    for (i = 0; i < (n); i++) {
      if (a[i] > m) {
        m = a[i];
      } else
        ;
      x++;
      if (x >= m) {
        g++;
        x = 0;
      } else
        ;
    }
    cout << g << endl;
  }
  return 0;
}
