My question is very similar to this one but instead of counting unique occurrences row by row I would like to do it in a range formed by 2 rows or 3 three rows... or n rows (i.e. several rows and several columns).
Here's a Google Spreadsheet sample
Any thoughts or ideas would be appreciated, thank you!

try:
update:
full explanation of the formula & how it works