added contour counter with counts the objects