#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> e;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    e.push_back(a);
  }
  sort(e.begin(), e.end());
  int start = 0, end, count = 0;
  while (start < n) {
    end = start + e[start];
    while (end <= n && end - start < e[end - 1]) end = start + e[end - 1];
    if (end <= n)
      count++;
    else
      break;
    start = end;
  }
  cout << count << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) solve();
  return 0;
}
