#include <bits/stdc++.h>
using namespace std;
map<int, int> m;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      int k;
      cin >> k;
      if (m.find(k) != m.end()) {
        m[k]++;
      } else {
        m.insert(make_pair(k, 1));
      }
    }
    int ans = 0;
    for (auto& x : m) {
      ans += x.second / x.first;
      if (x.second % x.first != 0) {
        for (int i = x.first + 1; i <= n; i++) {
          if (m.find(i) != m.end()) {
            m[i] += (x.second % x.first);
            break;
          }
        }
      }
    }
    cout << ans << endl;
    m.clear();
  }
  return 0;
}
