#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, t, n, temp;
  cin >> t;
  while (t > 0) {
    map<int, int> mp;
    cin >> n;
    int arr[n];
    for (i = 0; i < n; i++) {
      cin >> temp;
      mp[temp]++;
    }
    int Count = 0;
    for (i = 1; i <= n; i++) {
      if (mp[i] >= i) Count += (mp[i] / i);
      if (i < n) {
        mp[i + 1] += mp[i] % i;
      }
    }
    cout << Count << endl;
    t--;
  }
  return 0;
}
