#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (long long i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    long long ans = 0;
    for (long long i = 0; i < n;) {
      long long cnt = 1;
      while (cnt < a[i] && (i < n - 1)) {
        cnt++;
        i++;
      }
      if (cnt >= a[i]) {
        ans++;
      }
      i++;
    }
    printf("%d\n", ans);
  }
  return 0;
}
