Count objects in image using Python