#include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
long long int power(long long int x, long long int y,
                    long long int p = 1000000007) {
  long long int res = 1LL;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1LL) res = (res * x) % p;
    y = y >> 1LL;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    for (int i = (0); i < (n); ++i) {
      cin >> arr[i];
    }
    sort(arr, arr + n);
    int ans = 0;
    int i = 0, sz, mx;
    while (i < n) {
      mx = arr[i];
      sz = 1;
      while (i < n && sz < mx) {
        ++i;
        mx = max(arr[i], mx);
        ++sz;
      }
      if (sz >= mx) ++ans;
      ++i;
    }
    cout << ans << endl;
  }
  return 0;
}
