The len() function in Python counts how many items are inside a collection like a list or string. When you call len(my_list), Python checks the list and returns the number of items it contains as an integer. For example, if my_list has three items, len(my_list) returns 3. This value can be stored in a variable and printed. len() does not return the list itself, only the count of items. It works only on objects that have a length, like lists, strings, and tuples. Using len() on a number causes an error because numbers don't have length. The returned value is always an integer representing the size of the collection.