Added transformation of geom for value count (postgis does not do this automatically)