added tests for redis key counts and undefined handling