Added size() method to the API, to get the current object index.