Quoting @Sergent:

"What is the formula to count the number of operations in Calc? Like in one cell I write this "=2+52+662+71" And need the answer in other cell "4". ..."

The supposed result "4" for your example does not count the number of operations but the numbert of operands. The calculation explicitly is demanding 3 operations. How Calc does it in the background, and how many operations are needed then we don't know..

What result would you expect if the formula was `=IF(A1+A2<100;2+52*662+71;0)`

?

To get a formula contained in a cell as a text result you have the function `FORMULA()`

in Calc. (I didn't check for its French name. Suppose it's `TEXTEFORMULE`

.)

To count how many cells in a range, say `A1:A6`

, contain a formula you can use

`{=COUNTIF(NOT(ISERROR(FORMULA(A1:A6)));TRUE())}`

entered for array evaluation with Ctrl+Shift+Enter.

The much simpler `{=COUNTIF(ISFORMULA(A1:A6);TRUE())}`

or `=SUMPRODUCT(ISFORMULA(A1:A6))`

should also work, but there is a bug. A fix was recently announced. It shall be available in V 6.1.1.

For accumulating functions used on simple ranges like `SUM(A1:C6)`

you can use

`=COLUMNS(A1:C6)*ROWS(A1:C6)-SUMPRODUCT(NOT(ISNUMBER(A1:C6)))`

in an additional cell to get the number of (actual = numeric) operands. The overall size of the range is simply `=COLUMNS(A1:C6)*ROWS(A1:C6)`

.

Back to the **simple continued sums** like in the original example:

For `=1+2+3+4+A4+99`

in cell `S1`

`=LEN(S1)-LEN(SUBSTITUTE(S1;"+";""))`

would return the number of adding operands ("+") =5 and an additional +1 appended to the formula would produce the 6 as the number of operands (addends) including single references. To do similar things for expressions containing different operands and/or parentheses or... it's much more complicated.

**Editing1:**

Sorry! The last formula assumed S1 to contain the formula as a text.

S1 being the cell where the adding formula was entered the operand-counting formula must be:

`=LEN(FORMULA(S1))-LEN(SUBSTITUTE(FORMULA(S1);"+";""))`