How to find array size in QTP

Example -


Below code will find an size of array  in QTP.


print (ubound(arr) + 1)

Ubound returns the last index in array - so size of array will be +1.