JavaScript - Count all the elements in a given stack

JavaScript - Count all the elements in a given stack

More to explore

Based on this image's title: “JavaScript - Count all the elements in a given stack