You're mixing floating point division (which supports numbers like 0.75) and int division (which rounds numbers like 0.75 to 0). Change your numbers to double or float.
You can test this by adding print statements:
System.out.println("redCount: " + redCount);
System.out.println("totalPixels: " + totalPixels);
System.out.pirntln("redCount/totalPixels: " + (redCount/totalPixels) );
int totalRed = (redCount/totalPixels)*100;