#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<long long> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    sort(a.begin(), a.end());
    int m = n;
    long long ans = 0;
    int l = 0, r = 0;
    while (r < n) {
      long long mx = a[r];
      int count = 1;
      while (count < mx && r < n) {
        r++;
        mx = max(mx, a[r]);
        count++;
      }
      if (r < n) {
        ans++;
        r++;
        l = r;
      }
    }
    cout << ans << "\n";
  }
}
