Object counting in digital images