#include <bits/stdc++.h>
using namespace std;
const int OO = INT_MAX;
const int N = 2e5 + 2;
const int MOD = 1e9 + 7;
double ebs = 1e-6;
const int INF = 0x3f3f3f3f;
int in[N];
map<int, int> mp;
int main() {
  ios::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    mp.clear();
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> in[i];
      mp[in[i]]++;
    }
    long long res = 0, m = 0;
    for (auto it = mp.begin(); it != mp.end(); it++) {
      it->second += m;
      res += it->second / it->first;
      m = it->second % it->first;
    }
    cout << res << endl;
  }
}
