#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int test;
  cin >> test;
  while (test--) {
    long long int n;
    cin >> n;
    long long int *a = new long long int[n];
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
    };
    long long int freq[n + 1];
    memset(freq, 0, sizeof(freq));
    for (long long int i = 0; i < n; i++) freq[a[i]]++;
    long long int ans = 0;
    long long int rem = 0;
    for (long long int i = 1; i < n + 1; i++) {
      freq[i] += rem;
      ans += freq[i] / i;
      rem = freq[i] % i;
    }
    cout << ans << endl;
  }
}
