#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    int n, i, ans = 0, j, ast;
    cin >> n;
    int a[n + 1];
    for (i = 1; i <= n; i++) {
      cin >> a[i];
    }
    sort(a + 1, a + n + 1);
    for (i = 1; i <= n; i++) {
      if (a[i] != -1) {
        ast = a[i], ans++;
        if (i == n) break;
        for (j = i + 1; j <= n; j++) {
          if (a[j] > (ast + 1)) {
            ast = a[j];
            a[j] = -1;
          }
        }
      }
    }
    cout << min(n, ans) << endl;
  }
}
