Object counting in images