\cdbalgorithm{number\_of\_terms}{}

Displays the number of terms in a sum.
\begin{screen}{1,2}
A + B + C + D;
@number_of_terms(%);
4;
\end{screen}
Note that this leaves the expression unmodified; if you want to use
the number instead of just seeing it displayed,
use \subscommand{length}.

\cdbseealgo{length}
