Maxima Function
nterms (expr)
Returns the number of terms that expr would have if it were
fully expanded out and no cancellations or combination of terms
occurred.
Note that expressions like sin (expr)
, sqrt (expr)
, exp (expr)
, etc.
count as just one term regardless of how many terms expr has (if it is a
sum).