same as you create a search, and run it to get len...
# suitescript
s
same as you create a search, and run it to get lengths of result, but remember there is paging.