
- Redis Basics
- Redis - Home
- Redis - Overview
- Redis - Environment
- Redis - Configuration
- Redis - Data types
- Redis Commands
- Redis - Commands
- Redis - Keys
- Redis - Strings
- Redis - Hashes
- Redis - Lists
- Redis - Sets
- Redis - Sorted Sets
- Redis - HyperLogLog
- Redis - Publish Subscribe
- Redis - Transactions
- Redis - Scripting
- Redis - Connections
- Redis - Server
- Redis Advanced
- Redis - Backup
- Redis - Security
- Redis - Benchmarks
- Redis - Client Connection
- Redis - Pipelining
- Redis - Partitioning
- Redis - Java
- Redis - Php
- Redis Useful Resources
- Redis - Quick Guide
- Redis - Useful Resources
- Redis - Discussion
Redis - Sorted Set Zcount Command
Redis ZCOUNT command returns the number of elements in the sorted set at the key with a score between min and max.
Return Value
Integer reply, the number of elements in the specified score range.
Syntax
Following is the basic syntax of Redis ZCOUNT command.
redis 127.0.0.1:6379> ZCOUNT KEY_NAME
Example
redis 127.0.0.1:6379> ZADD myset 1 "hello" (integer) 1 redis 127.0.0.1:6379> ZADD myset 1 "foo" (integer) 1 redis 127.0.0.1:6379> ZADD myset 2 "world" 3 "bar" (integer) 2 redis 127.0.0.1:6379> ZCOUNT myzset (1 3 (integer) 2
redis_sorted_sets.htm
Advertisements