list_length
Entity: function

Usage:
N is list_length(List)

Here List has to be a Prolog list, i.e. normal list ending with the empty list. This function calculates and returns the number of the elements of List .

Example:

?- N is list_length([1,2,3]), write(N), nl.