EDIT: I made a few notes here as I was going through the XLSX (attached).
This is fine as-is because you are using count-selected() on its own. It's just the nature of count-selected() to give you the result you are looking for. But, if you combine this with other calculates you will likely run into issues:
![abureaux_2-1707413637265.png abureaux_2-1707413637265.png](https://community.esri.com/t5/image/serverpage/image-id/94125i3E0D769645BBAB28/image-size/medium?v=v2&px=400)
This one wont work because you wrapped the entire end result in int(). Essentially, you are converting your string of separate numbers (e.g., 111 vs 3) into an integer. If you want this to work, each individual item needs its own int() (e.g., int(${field1}) + int(${field2}):
![abureaux_5-1707413869682.png abureaux_5-1707413869682.png](https://community.esri.com/t5/image/serverpage/image-id/94129i253635152DE06254/image-size/medium?v=v2&px=400)
You use a lot of type hidden fields. This is not recommended:
![abureaux_3-1707413732481.png abureaux_3-1707413732481.png](https://community.esri.com/t5/image/serverpage/image-id/94127iF99FA45DFC86ADA2/image-size/medium?v=v2&px=400)
The better approach is to select the appropriate data type (e.g., Integer) and then make the appearance hidden:
![abureaux_4-1707413796355.png abureaux_4-1707413796355.png](https://community.esri.com/t5/image/serverpage/image-id/94128i62CFF4CE8E47B9FE/image-size/medium?v=v2&px=400)
Because your IF statements use "null", you are adding stuff that shouldn't be added, meaning you may end up with this in some cases (NaN = Not a Number):
![abureaux_0-1707413598042.png abureaux_0-1707413598042.png](https://community.esri.com/t5/image/serverpage/image-id/94123iA07E6753A208F0F9/image-dimensions/248x88?v=v2)
Looking at your formula, it may make more sense to swap a few things up.For example, most of your "hidden" fields should b calculates.
I also noticed you were missing your constraints for the spinners. This is how they should appear:
![abureaux_9-1707414668759.png abureaux_9-1707414668759.png](https://community.esri.com/t5/image/serverpage/image-id/94140iA1808C8867F44C4D/image-size/medium?v=v2&px=400)
For future reference: calculates do not require a label, and notes do not require a name.
I have made some edits to the XLSX. I am not saying that it is perfect, but it should put you into the right direction (and all of your calculate fields at the end are working).