#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    map<int, int> mp;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      mp[arr[i]]++;
    }
    int rem = 0;
    int ans = 0;
    for (auto it : mp) {
      int tg = it.second / it.first;
      ans += tg;
      rem += it.second - (it.first * tg);
      if (rem >= it.first) {
        rem -= it.first;
        ans++;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
