#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n + 1];
    a[0] = 0;
    map<long long, long long> mp;
    for (long long i = 1; i <= n; i++) {
      cin >> a[i];
      mp[a[i]]++;
    }
    sort(a, a + n + 1);
    long long ans = 0;
    long long left = 0;
    for (long long i = 1; i <= n; i++) {
      long long val = left + mp[i];
      ans += val / i;
      long long rem = val % i;
      left = rem;
    }
    cout << ans << "\n";
  }
  return 0;
}
