lucky-numbers-8
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

Lucky numbers are those numbers which are greater than all numbers to its right side.You task is to count all lucky numbers in a given array.
RightMost Element is always lucky Number
INPUT First line contain number of test case T. Each test case contain number of elements N.Next line contains elements of array.
OUTPUT Print numbers of lucky numbers.
Constraints
1 ≤ T ≤ 100

1 ≤ N ≤ 1000000

1 ≤ Elements ≤ 1000000

SAMPLE INPUT
1
6
16 17 4 3 5 2

SAMPLE OUTPUT
3

Explanation

Lucky numbers are 17 , 5 , 2


for _ in range(eval(input())):
	n,a=eval(input()),list(map(int,input().split()))
	b=list(reversed(a))
	if b==sorted(a):
		print(n)
	else:
		k=0
		for x in range(n):
			z=0
			for y in range(x+1,n):
				if a[x]<=a[y] :
					z=1
					break
			if z==0:
				k+=1
		print(k)


t=eval(input())

for _ in range(t):
	n = eval(input())
	l=list(map(int,input().split()))
	count=0
	maxi=0
	l=l[::-1]
	for element in l:
		if element>maxi:
			count+=1
			maxi=element
	print(count)		


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
#print 'Hello World!'
n = int(input())
i = 0
while i < n:
	nn = int(input())
	a = []
	ctr = 0
	while len(a) != nn:
		a += list(map(int,input().split()))
	max = -9999999;
	for x in a[::-1]:
		if x > max:
			max = x
			ctr+=1
		
	print(ctr)
	i += 1
	


t=eval(input())
for _ in range(0,t):
	n=eval(input())
	case=list(map(int, input().split()))
	cnt=0
	for x in range(0,n-1):
		mx=case[x]
		i=x+1
		while case[i]<mx:
			i+=1
			if i==n:
				cnt+=1
#                print mx
				break
	print(cnt+1)


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
#print 'Hello World!'
def main():
	tc=int(input())
	while(tc>0):
		n=int(input())
		a=list(map(int,input().split()))
		i=n-2
		dp=[0]*n
		dp[n-1]=a[n-1]
		while(i>=0):
			dp[i]=max(dp[i+1],a[i])
			i-=1
		ans=1
		i=0
		#print dp
		while(i<=n-2):
			if a[i]>dp[i+1]:
				ans+=1
			i+=1
		print(ans)
		tc-=1
main()


for i in range(eval(input())):
	neg, arr = eval(input()), list(map(int, input().split()))
	temp,ans =arr[neg-1], 1
	for i in reversed(list(range(len(arr)-1)) ):
		if arr[i] > temp:
			temp = arr[i]
			ans +=1
	print(ans)
	  


tc=int(input())
for case in range(tc):
	n=int(input())
	a=list(map(int,input().split()))
	m=a[n-1]
	c=1
	for i in a[::-1]:
	    if i>m:
		c=c+1
		m=i
	print(c)


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
t=int(input())
while t>0:
	n=int(input())
	a=[int(x) for x in input().split()]
#	print(a)
#	print(len(a))
	max1=a[n-1]
#	print(max1)
	c=1
	for i in range(n-2,-1,-1):
#		print(str(a[i])+" "+str(max1))
		if a[i]>max1:
			c=c+1
			max1=a[i]
	print(c)		
	t=t-1