BEFORE

A B C
1 0 0
0 1 0
0 0 1
1 1 1

AFTER
A B C Countif
1 0 0 1
0 1 0 1
0 0 1 1
1 1 1 3

I am calculating the number of 1's across the rows. If the sheet as 3 columns , i want to add 4th column with countif formula. What challenge i am facing is the column count and row count is not constant, they are varying .