KCOUNTRANGE

Return number of keys in specified range.

Request arguments

Response

Single-line int with number of keys that exist.

Example

Get number of keys in the range [:bar] (i.e. all up bar, excluded) in mytable (returns: 1).

REQUEST                               RESPONSE

@12345678                             @12345678    
*5                                    :1    
$11                                   
KCOUNTRANGE                           
$7                                    
mytable                               
$-1    
$3                                    
bar    
$1    
0