Language: Java

import java.util.*;

class Main{
		int[] count = new int[26];

	public static void main(String[] args){
		for(int i=0;i<26;i++){
			count[i]=0;
		}
		Scanner sc=new Scanner(System.in);
		while(sc.hasNextLine()){
			String line=sc.nextLine();
			for(int i=0;i<line.length();i++){
				String str =line.substring(i,i+1);
		if(s.equals("A") || s.equals("a")){
			count[0]+=1;
		}else if(s.equals("B") || s.equals("b")){
			count[1]+=1;
		}else if(s.equals("C") || s.equals("c")){
			count[2]+=1;
		}else if(s.equals("D") || s.equals("d")){
			count[3]+=1;
		}else if(s.equals("E") || s.equals("e")){
			count[4]+=1;
		}else if(s.equals("F") || s.equals("f")){
			count[5]+=1;
		}else if(s.equals("G") || s.equals("g")){
			count[6]+=1;
		}else if(s.equals("H") || s.equals("h")){
			count[7]+=1;
		}else if(s.equals("I") || s.equals("i")){
			count[8]+=1;
		}else if(s.equals("J") || s.equals("j")){
			count[9]+=1;
		}else if(s.equals("K") || s.equals("k")){
			count[10]+=1;
		}else if(s.equals("L") || s.equals("l")){
			count[11]+=1;
		}else if(s.equals("M") || s.equals("m")){
			count[12]+=1;
		}else if(s.equals("N") || s.equals("n")){
			count[13]+=1;
		}else if(s.equals("O") || s.equals("o")){
			count[14]+=1;
		}else if(s.equals("P") || s.equals("p")){
			count[15]+=1;
		}else if(s.equals("Q") || s.equals("q")){
			count[16]+=1;
		}else if(s.equals("R") || s.equals("r")){
			count[17]+=1;
		}else if(s.equals("S") || s.equals("s")){
			count[18]+=1;
		}else if(s.equals("T") || s.equals("t")){
			count[19]+=1;
		}else if(s.equals("U") || s.equals("u")){
			count[20]+=1;
		}else if(s.equals("V") || s.equals("v")){
			count[21]+=1;
		}else if(s.equals("W") || s.equals("w")){
			count[22]+=1;
		}else if(s.equals("X") || s.equals("x")){
			count[23]+=1;
		}else if(s.equals("Y") || s.equals("y")){
			count[24]+=1;
		}else if(s.equals("Z") || s.equals("z")){
			count[25]+=1;
		}
			}
		}
		System.out.println("a : "+count[0]);
		System.out.println("b : "+count[1]);
		System.out.println("c : "+count[2]);
		System.out.println("d : "+count[3]);
		System.out.println("e : "+count[4]);
		System.out.println("f : "+count[5]);
		System.out.println("g : "+count[6]);
		System.out.println("h : "+count[7]);
		System.out.println("i : "+count[8]);
		System.out.println("j : "+count[9]);
		System.out.println("k : "+count[10]);
		System.out.println("l : "+count[11]);
		System.out.println("m : "+count[12]);
		System.out.println("n : "+count[13]);
		System.out.println("o : "+count[14]);
		System.out.println("p : "+count[15]);
		System.out.println("q : "+count[16]);
		System.out.println("r : "+count[17]);
		System.out.println("s : "+count[18]);
		System.out.println("t : "+count[19]);
		System.out.println("u : "+count[20]);
		System.out.println("v : "+count[21]);
		System.out.println("w : "+count[22]);
		System.out.println("x : "+count[23]);
		System.out.println("y : "+count[24]);
		System.out.println("z : "+count[25]);
	}
}

Compiler output:
Main.java:8: error: non-static variable count cannot be referenced from a static context
			count[i]=0;
			^
Main.java:15: error: cannot find symbol
		if(s.equals("A") || s.equals("a")){
		   ^
  symbol:   variable s
  location: class Main
Main.java:15: error: cannot find symbol
		if(s.equals("A") || s.equals("a")){
		                    ^
  symbol:   variable s
  location: class Main
Main.java:16: error: non-static variable count cannot be referenced from a static context
			count[0]+=1;
			^
Main.java:17: error: cannot find symbol
		}else if(s.equals("B") || s.equals("b")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:17: error: cannot find symbol
		}else if(s.equals("B") || s.equals("b")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:18: error: non-static variable count cannot be referenced from a static context
			count[1]+=1;
			^
Main.java:19: error: cannot find symbol
		}else if(s.equals("C") || s.equals("c")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:19: error: cannot find symbol
		}else if(s.equals("C") || s.equals("c")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:20: error: non-static variable count cannot be referenced from a static context
			count[2]+=1;
			^
Main.java:21: error: cannot find symbol
		}else if(s.equals("D") || s.equals("d")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:21: error: cannot find symbol
		}else if(s.equals("D") || s.equals("d")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:22: error: non-static variable count cannot be referenced from a static context
			count[3]+=1;
			^
Main.java:23: error: cannot find symbol
		}else if(s.equals("E") || s.equals("e")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:23: error: cannot find symbol
		}else if(s.equals("E") || s.equals("e")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:24: error: non-static variable count cannot be referenced from a static context
			count[4]+=1;
			^
Main.java:25: error: cannot find symbol
		}else if(s.equals("F") || s.equals("f")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:25: error: cannot find symbol
		}else if(s.equals("F") || s.equals("f")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:26: error: non-static variable count cannot be referenced from a static context
			count[5]+=1;
			^
Main.java:27: error: cannot find symbol
		}else if(s.equals("G") || s.equals("g")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:27: error: cannot find symbol
		}else if(s.equals("G") || s.equals("g")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:28: error: non-static variable count cannot be referenced from a static context
			count[6]+=1;
			^
Main.java:29: error: cannot find symbol
		}else if(s.equals("H") || s.equals("h")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:29: error: cannot find symbol
		}else if(s.equals("H") || s.equals("h")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:30: error: non-static variable count cannot be referenced from a static context
			count[7]+=1;
			^
Main.java:31: error: cannot find symbol
		}else if(s.equals("I") || s.equals("i")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:31: error: cannot find symbol
		}else if(s.equals("I") || s.equals("i")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:32: error: non-static variable count cannot be referenced from a static context
			count[8]+=1;
			^
Main.java:33: error: cannot find symbol
		}else if(s.equals("J") || s.equals("j")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:33: error: cannot find symbol
		}else if(s.equals("J") || s.equals("j")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:34: error: non-static variable count cannot be referenced from a static context
			count[9]+=1;
			^
Main.java:35: error: cannot find symbol
		}else if(s.equals("K") || s.equals("k")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:35: error: cannot find symbol
		}else if(s.equals("K") || s.equals("k")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:36: error: non-static variable count cannot be referenced from a static context
			count[10]+=1;
			^
Main.java:37: error: cannot find symbol
		}else if(s.equals("L") || s.equals("l")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:37: error: cannot find symbol
		}else if(s.equals("L") || s.equals("l")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:38: error: non-static variable count cannot be referenced from a static context
			count[11]+=1;
			^
Main.java:39: error: cannot find symbol
		}else if(s.equals("M") || s.equals("m")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:39: error: cannot find symbol
		}else if(s.equals("M") || s.equals("m")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:40: error: non-static variable count cannot be referenced from a static context
			count[12]+=1;
			^
Main.java:41: error: cannot find symbol
		}else if(s.equals("N") || s.equals("n")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:41: error: cannot find symbol
		}else if(s.equals("N") || s.equals("n")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:42: error: non-static variable count cannot be referenced from a static context
			count[13]+=1;
			^
Main.java:43: error: cannot find symbol
		}else if(s.equals("O") || s.equals("o")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:43: error: cannot find symbol
		}else if(s.equals("O") || s.equals("o")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:44: error: non-static variable count cannot be referenced from a static context
			count[14]+=1;
			^
Main.java:45: error: cannot find symbol
		}else if(s.equals("P") || s.equals("p")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:45: error: cannot find symbol
		}else if(s.equals("P") || s.equals("p")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:46: error: non-static variable count cannot be referenced from a static context
			count[15]+=1;
			^
Main.java:47: error: cannot find symbol
		}else if(s.equals("Q") || s.equals("q")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:47: error: cannot find symbol
		}else if(s.equals("Q") || s.equals("q")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:48: error: non-static variable count cannot be referenced from a static context
			count[16]+=1;
			^
Main.java:49: error: cannot find symbol
		}else if(s.equals("R") || s.equals("r")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:49: error: cannot find symbol
		}else if(s.equals("R") || s.equals("r")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:50: error: non-static variable count cannot be referenced from a static context
			count[17]+=1;
			^
Main.java:51: error: cannot find symbol
		}else if(s.equals("S") || s.equals("s")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:51: error: cannot find symbol
		}else if(s.equals("S") || s.equals("s")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:52: error: non-static variable count cannot be referenced from a static context
			count[18]+=1;
			^
Main.java:53: error: cannot find symbol
		}else if(s.equals("T") || s.equals("t")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:53: error: cannot find symbol
		}else if(s.equals("T") || s.equals("t")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:54: error: non-static variable count cannot be referenced from a static context
			count[19]+=1;
			^
Main.java:55: error: cannot find symbol
		}else if(s.equals("U") || s.equals("u")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:55: error: cannot find symbol
		}else if(s.equals("U") || s.equals("u")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:56: error: non-static variable count cannot be referenced from a static context
			count[20]+=1;
			^
Main.java:57: error: cannot find symbol
		}else if(s.equals("V") || s.equals("v")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:57: error: cannot find symbol
		}else if(s.equals("V") || s.equals("v")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:58: error: non-static variable count cannot be referenced from a static context
			count[21]+=1;
			^
Main.java:59: error: cannot find symbol
		}else if(s.equals("W") || s.equals("w")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:59: error: cannot find symbol
		}else if(s.equals("W") || s.equals("w")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:60: error: non-static variable count cannot be referenced from a static context
			count[22]+=1;
			^
Main.java:61: error: cannot find symbol
		}else if(s.equals("X") || s.equals("x")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:61: error: cannot find symbol
		}else if(s.equals("X") || s.equals("x")){
		                          ^
  symbol:   variable s
  location: class Main
Main.java:62: error: non-static variable count cannot be referenced from a static context
			count[23]+=1;
			^
Main.java:63: error: cannot find symbol
		}else if(s.equals("Y") || s.equals("y")){
		         ^
  symbol:   variable s
  location: class Main
Main.java:63: error: cannot find symbol
		}else if(s.equals("Y"