#include <bits/stdc++.h>
using namespace std;
long long n;
long long solve(long long arr[]) {
  long long rem = 1, count = 0;
  long long next_rem = 0;
  for (int i = 1; i < n; i++) {
    if (arr[i] > arr[i - 1]) {
      next_rem++;
    } else {
      rem--;
      if (rem == 0) {
        rem = next_rem;
        count++;
        next_rem = 1;
      } else {
        next_rem++;
      }
    }
  }
  return count + 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long long tt;
  for (cin >> tt; tt; --tt) {
    cin >> n;
    long long arr[n];
    for (long long i = 0; i < n; i++) cin >> arr[i];
    cout << solve(arr) << endl;
    ;
  }
}
