LinuxKPI: list.h add list_count_nodes()
Implement list_count_nodes() using a simple loop. This is needed by
an updated wireless driver.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D40757