To get number of items in a list you can use len() function of python. len() function can be used with several different types in Python - both built-in types and library types.
Have a look.
>>> len([1,2,3]) 3
Important thing to note is, to not use len() function to check emptiness of any list, however, you should use it to test length.
To check required length
if len(items) == required_length: ...
To check emptiness or presence of value
if items: .... # This block will be executed if items list is not empty
if not items: ... # This block will be executed if items list is empty