Created method countOccurences(char a, String b). The one from commons lang wasn't working.