key counts palindrome detection.