```
public int count_two_char(String s, char c, char d){
    int count = 0;

    for(int i = 0; i < s.length(); i++) {
        if(s.charAt(i) == c){
            count = count + 1;
        }

        int count1 = 0;

        for(int i1 = 0; i1 < s.length(); i1++) {
            if(s.charAt(i1) == d){
                count1 = count1 + 1;
            }
            int count2 = count + count1;
        }
    }
    return count2;

```

The error is `count2 cannot be resolved to a variable` but I've already declared count2 as a variable,