I tried using the "Countifs" (Google Measure) ...but, I'm hoping there's a simple(r) way to "Look" 👀 ...at:
Explained:
Here's one approach you may test out:
=byrow(B2:S,lambda(Σ,if(counta(Σ)=0,,len(regexreplace(regexreplace(join(,Σ),"0{3}","Λ"),"[^Λ]",)))))
Modified formula if there's gonna be empty cells:
=byrow(B2:S,lambda(Σ,if(counta(Σ)=0,,len(regexreplace(regexreplace(join(,switch(Σ,"","x",Σ)),"0{3}","Λ"),"[^Λ]",)))))