You can have an instance variable called 'id' and when you create each body segment you create it with an 'id' equal to the current number of apples you have eaten.
This way the first body part is id=1 and so on.
Now you can select the instance by its id, or make a loop to cycle through them quickly.
Alternatively, you can select objects by instance id from the System object (not sure how this numbering work though)