find contours and count them