#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, s = 0;
    scanf("%d", &n);
    int arr[n];
    map<int, int> x;
    for (int i = 0; i < n; i++) {
      scanf("%d", &arr[i]);
      x[arr[i]]++;
    }
    int a = 0;
    map<int, int>::iterator it = x.begin();
    for (; it != x.end(); it++) {
      s += (a + it->second) / it->first;
      a = (a + it->second) % it->first;
    }
    printf("%d\n", s);
  }
  return 0;
}
