# Built-in WL function to count addends or terms ?

**URL:** <https://community.wolfram.com/t/built-in-wl-function-to-count-addends-or-terms/8770>\
**Category:** Questions\
**Created:** [June 18, 2016, 10:52pm UTC](https://community.wolfram.com/t/built-in-wl-function-to-count-addends-or-terms/8770 "2016-06-18T22:52:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtenne](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@mtenne](https://community.wolfram.com/u/mtenne)\
**Post date:** [June 18, 2016, 10:52pm UTC](https://community.wolfram.com/t/built-in-wl-function-to-count-addends-or-terms/8770/1 "2016-06-18T22:52:13Z")

</div>

I have a long summation with many (thousands) addends like 1+1/(1+a) +1/(1+b)-3/(7+c)+ … .  
Is there a simple built -in function in Mathematica that can count the addends of a long algebraic summation ?  
I mean a function that can count the number of terms added and/or subtracted ?  
Or do I have to convert the summation to a list by changing the + and - signs to commas?

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [June 18, 2016, 11:31pm UTC](https://community.wolfram.com/t/built-in-wl-function-to-count-addends-or-terms/8770/2 "2016-06-18T23:31:05Z")

</div>

In[3]:= Length[1 + 1/(1 + a) + 1/(1 + b) + 3/(7 + c)]

```
Out[3]= 4

```

That will work as long as the head of the entire expression is Plus, which includes expressions containing negative terms.  
since they are internalized as negative numbers times expressions,  
and the whole expression doesn’t automatically simplify.

---

<div class="post-metadata">

**Author:** ![mtenne](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@mtenne](https://community.wolfram.com/u/mtenne)\
**Post date:** [June 19, 2016, 1:18am UTC](https://community.wolfram.com/t/built-in-wl-function-to-count-addends-or-terms/8770/3 "2016-06-19T01:18:07Z")

</div>

Thank you very much. That answers my question.
