implemented count feature on regions