static int countCompress(String s) {
        char[] charArray = s.toCharArray();
        int count = 0;
        int length = 0;
        char currentChar = '\0';
        for (char ch: charArray) {
            if (ch == currentChar) {
                count += 1;
            } else {
                if (currentChar != '\0') {
                    length += 1+String.valueOf(count).length();
                }
                currentChar = ch;
                count = 1;
            }
        }
        return length += 1+String.valueOf(count).length();
    }