Python: How to know how many objects are inside of the selection ?
In Python indexing works from the beginning AND from the end.
So if you need the second to last object in a list:

somelist = [ "a" , "b" ,"c" , "d" , "e" ]
print(somelist[-2])


would print

d