#include <bits/stdc++.h>
using namespace std;
int main() {
  int T, tc = 0;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
    }
    sort(a, a + n);
    int ans = 0;
    int taken = 0;
    for (int i = 0; i < n; ++i) {
      if (i + 1 - taken >= a[i]) {
        ans++;
        taken += a[i];
      }
    }
    cout << ans << endl;
  }
  return 0;
}
