How to get nested type array length?

I think the easiest way would be to store the length of the array as an additional field in the document. You can achieve this using the script processor

--Alex