#include <bits/stdc++.h>
using namespace std;
int main() {
  int _;
  cin >> _;
  while (_--) {
    int n, res = 0;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
    }
    sort(a.begin(), a.end());
    int r = 0, tmp = 0;
    for (int i = 0; i < n; ++i) {
      if (tmp == 0) {
        r = a[i];
        tmp = a[i];
        ++res;
      }
      if (r != a[i]) {
        tmp += (a[i] - r);
        r = a[i];
      }
      --tmp;
    }
    if (tmp != 0) {
      --res;
    }
    cout << res << endl;
  }
  return 0;
}
