#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 1e9 + 5;
void min_self(long long& a, long long b) { a = min(a, b); }
void max_self(long long& a, long long b) { a = max(a, b); }
void add_self(long long& a, long long b) { a = (a + b) % mod; }
void solve() {
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  long long i = 0;
  long long count = 0;
  while (i < n) {
    long long temp = 0;
    long long j = i;
    long long k = arr[i];
    while (k != temp && j < n) {
      k = max(k, arr[j]);
      j++;
      temp++;
    }
    if (temp == k) count++;
    i = j;
  }
  cout << count << endl;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) solve();
}
