how to count objects in an image using python