#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int arr[n];
    for (long long int i = 0; i < n; i++) cin >> arr[i];
    sort(arr, arr + n);
    long long int res = 0;
    for (long long int i = 0; i < n;) {
      long long int num = 1;
      while (num < arr[i] && i < (n - 1)) {
        num++;
        i++;
      }
      if (num >= arr[i]) res++;
      i++;
    }
    cout << res << endl;
  }
  return 0;
}
