The COUNT() (v9.0+) function returns the size of the enclosing JSON array.
The COUNT() function is a special context sensitive function that only works while evaluating a JSON path.