#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int maxn = 2e5 + 10;
int n, a[maxn], cnt[maxn];
void solve() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[i + 1] = 0;
  }
  for (int i = 0; i < n; i++) cnt[a[i]]++;
  int left = 0, tmp = 0;
  int ans = 0;
  for (int i = 1; i < n + 1; i++) {
    tmp += (cnt[i] + left) / i;
    left = (cnt[i] + left) % i;
  }
  cout << tmp << '\n';
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  int T;
  cin >> T;
  while (T--) solve();
  return 0;
}
