Reader.countElements

int countElements()

Counts the elements of the current position, if the reader is positioned on an array.

In case of failure, the reader is set to an error state.

Returns

the number of elements, or -1.