#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    int l = a[n - 1] + 1;
    int fa[a[n - 1] + 1];
    for (int i = 0; i < l; i++) fa[i] = 0;
    for (int i = 0; i < n; i++) {
      fa[a[i]]++;
    }
    long long int c = 0, r = 0, rd = 0;
    for (int i = 1; i < l; i++) {
      c = c + fa[i] / (i);
      r = r + fa[i] % (i);
      int rm = fa[i] % i;
      if (fa[i] > 0 && rm != 0) rd = i;
      if (rd > 0) {
        if (r / rd > 0) {
          c = c + r / rd;
          r = r % rd;
        }
      }
    }
    if (rd != 0) c = c + r / rd;
    cout << c << "\n";
  }
}
