Select raster cells within polygon

Discussion created by kmorin on Oct 2, 2011
Hi Iam new to GIS and try to learn it.
I hope someone can save my day =) I think this would be pretty basic but Im new to this...

I have a raster and a polygon layer. I want to select all the cells with value 2 and 5 that are within the polygons.
I also need to do the oposit, find how many cells with the value 2 and 5 outside the polygons.

I have been trying different things for hours but cant figure out how to solve it.
Any help very appreciated!