Here is one way to handle your issue. Assuming that all of your columns are numeric, this will work
As Constant(
count = 1;
lagFlag = 0;
dt = Current Data Table();
);
If( Is Missing( Sum( dt[Row(), 0] ) ) == 0,
If( lagFlag == 1,
count++;
lagFlag = 0;
)
,
lagFlag = 1
);
If( lagFlag == 0, count );
Jim