I have a raster with values from 1 - 12 (0 is no data) that has the extent of Sweden. These values represent factors, or categories rather then a numeric value. I would like to know how many of each factor there is in each of Swedens regions, which i have in a polygon layer. Can this be done without chopping up my raster in to 21 (or 12) peices? Zonal statistics will give me some statistics based on a polygon layer, but not the count of different values. r.stat and r.report will give me the output that i'm interested in but only across the entire raster. Is there a tool that will do both at the same time? Give me the count of each value in each region?
What i'm trying to do is exactly what is asked about here but not for the entire raster.