Skip to main content
Use ARCOUNT to count stored values.

Arguments

str
required
The array key.

Response

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.