new Tests + count polygons (some fixes needed) by Michael Spitzer