It is very simple: Just type:
list = ['apple','banana','orange']
def count():
len(list)
a = count()
len(a)
b = count()
len(b)
etc..