import
java.util.Scanner;
public
class CharCount {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Please input a String: ");
String inputString = input.nextLine();
System.out.print("Please input a char: ");
String inputChar = input.next();
char ch = inputChar.charAt(0);
int charCount = 0;
for(int i=0; i<inputString.length(); i++){
if(ch == inputString.charAt(i)){
charCount++;
}
}
System.out.println(charCount);
}
}