Check this web page for these forumals to do counts and sum. I didn’t know they had SUMX2PY2 kind of thing. Wow! Great!: “Summing up ways to add and count Excel data”
If you want to See
Add the product of corresponding values in multiple arrays SUMPRODUCT
Add the square of each value in a range SUMSQ
Add the sum of the square of corresponding values in two arrays SUMX2PY2
Add the difference of the square of corresponding values in two arrays SUMX2MY2
Add the square of the difference of corresponding values in two arrays SUMXMY2