Fix redis db count issue