get size() {

        // special case: the list is empty
        if (this[head] === null) {
            return 0;
        }

        /*
         * The `current` variable is used to iterate over the list nodes.
         * It starts out pointing to the head and is overwritten inside
         * of the loop below. `this[head]` points to the first node
         * in the list because the last node always points to the first node.
         */
        let current = this[head];

        /*
         * The `count` variable is used to keep track of how many nodes have
         * been visited inside the loop below. This is important because this
         * is the value to return from this method.
         */
        let count = 0;

        /*
         * Because the list is circular, we need to stop when `current` is
         * equal to `this[head]`, otherwise this will be an infinite loop.
         */
        do {
            count++;
            current = current.next;
        } while (current !== this[head]);

        /*
         * The loop is exited and the value of `count`
         * is the number of nodes that were counted in the loop.
         */
        return count;

    }
Returns the number of items in the list.
@returns {int} The number of items in the list.