#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans = 1;
  int c = 0, cp = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) {
      c++;
    } else {
      cp--;
      if (cp == 0) {
        cp = c;
        c = 1;
        ans++;
      } else
        c++;
    }
  }
  cout << ans << endl;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    solve();
  }
}
