#include <bits/stdc++.h>
using namespace std;
long long n;
vector<long long> v;
long long ans;
void getans(long long i, long long c, long long p) {
  if (i == n) return;
  if (c == 0) {
    ans++;
    getans(i, p, 0);
    return;
  }
  for (; i < n - 1; i++) {
    if (v[i] <= v[i + 1])
      p++;
    else
      break;
  }
  getans(i + 1, c - 1, p + 1);
}
void mymain() {
  cin >> n;
  v.assign(n, 0);
  for (long long i = 0; i < n; i++) cin >> v[i];
  ;
  ans = 1;
  getans(1, 1, 0);
  cout << ans << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tc;
  tc = 1;
  cin >> tc;
  for (long long tt = 1; tt <= tc; tt++) {
    mymain();
  }
  return 0;
}
