#include <bits/stdc++.h>
using namespace std;
int flag = 1;
long long int find(long long int m) {
  long long int p = m;
  long long int res, maxi = -1, mini = 11;
  while (m != 0) {
    res = m % 10;
    m = m / 10;
    if (maxi < res) maxi = res;
    if (mini > res) mini = res;
  }
  if (mini == 0) flag = 0;
  return (p + mini * maxi);
}
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, x, left = 0, sum = 0;
    cin >> n;
    long long int a[n + 1];
    for (int i = 0; i <= n; i++) a[i] = 0;
    for (int i = 0; i < n; i++) {
      cin >> x;
      a[x]++;
    }
    for (int i = 1; i <= n; i++) {
      a[i] += left;
      sum += a[i] / i;
      left = a[i] % i;
    }
    cout << sum << endl;
  }
  return (0);
}
