#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    int i;
    vector<long long int> v;
    for (i = 0; i < n; i++) {
      int x;
      cin >> x;
      v.push_back(x);
    }
    sort(v.begin(), v.end());
    long long int sum = 0, count = 0, rem = 0;
    for (i = 0; i < n; i++) {
      rem++;
      if (rem >= v[i]) {
        long long int temp = rem / v[i];
        count = count + (temp);
        rem -= temp * v[i];
      }
    }
    cout << count << "\n";
  }
  return 0;
}
