Skip to content

LeafCount

Counts the number of atoms (leaves) in an expression tree.

$ wo 'LeafCount[1 + x + y^2]'
6