I want to create a program that loads the RGB values of each pixel in a image and saves them in some kind of list/dictionary/tuple and then when I type in a value it tells me how much pixels in the image have that value. So far I have read through the whole PIL documentation trying to find a method that could fit my needs and I have tried several other approaches with for example the .getpixel() or the .load() function, but it is very difficult to save and evaluate that information for each pixel.
New in version 1.1.5 of PIL is the method getcolors() which should do exactly what you're looking for. The documentation from the PIL web documentation follows:

getcolors
im.getcolors() => a list of (count, color) tuples or None
im.getcolors(maxcolors) => a list of (count, color) tuples or None
(New in 1.1.5) Returns an unsorted list of (count, color) tuples,
  where the count is the number of times the corresponding color occurs
  in the image.
If the maxcolors value is exceeded, the method stops counting and
  returns None. The default maxcolors value is 256. To make sure you get
  all colors in an image, you can pass in size[0]*size[1] (but make sure
  you have lots of memory before you do that on huge images).
Pixel Loading and Evaluating with PIL