There are use cases where a linked list is useful but it's also worth the overhead to maintain a count so you can quickly answer queries of the size of the list.