public int Occ(byte countedCharacter, int index) throws ReportedException {

        int childIndex;

        if ((countedCharacter < lowCharacterNumber) || (countedCharacter > highCharacterNumber)) {
            reportError("Pokušaj dohvata broja znakova za znak koji ne postoji!");
            throw new ReportedException();
        }
        if (index > nodeSize) {
            reportError("Pokušaj dohvata broja znakova za prevelik indeks!");
            throw new ReportedException();
        }

        if (countedCharacter < thresholdCharacterNumber) {
            childIndex = (index - waveletNodeBitString.rank1(index));
            if (leftChild != null) {
                return leftChild.Occ(countedCharacter, childIndex);
            } else {
                return childIndex;
            }
        } else {
            childIndex = waveletNodeBitString.rank1(index);
            if (rightChild != null) {
                return rightChild.Occ(countedCharacter, childIndex);
            } else {
                return childIndex;
            }
        }
    }