Can object index be used as driver variable?

Is there any way to assign an order to multiple objects such that the index of each object can be used as a driving variable?
Will the method be applicable even when the objects are dupligroup instances?

import bpy
bpy.types.Object.index = bpy.props.FloatProperty() #Create new property ‘index’
obs = bpy.context.selected_objects
i=0
for ob in obs: #Object created last will be in the first iteration and so on
ob.index=i #Assign value for selected objects in order of creation
i+=1

An IntProperty would probably be better suited for use as an index.