Skip to main content

Use ARCOUNT to count stored values.

Arguments#

keystringrequired#

The array key.

Response#

stringrequired

The highest occupied index plus one. A missing key returns "0" in TypeScript or 0 in Python. TypeScript returns a string even for small lengths.

See the server command reference for protocol details.