INCR
Syntax
Section titled “Syntax”INCR key
INCR increments the integer at ‘key’ by one. Creates ‘key’ as 1 if absent. The command raises an error if the value is a non-integer.
Returns the new value of ‘key’ on success.
Examples
Section titled “Examples”localhost:7379> SET k 43OKlocalhost:7379> INCR kOK 44localhost:7379> INCR k2OK 1localhost:7379> GET k2OK "1"