Extend list_t with the number of elements in the list.