Depends what you mean by "0"...
But, something like this could work:
if the number is a zero, the counter is "1". Otherwise, it's "0". Then, you just sum up the counter outside of the repeat and you will get the number of times the value was "0"
Unless one of the limitations on using javascript in Survey123 gets in your way like not being able to do it on public facing surveys I'd do it that way. Passing repeats into a javascript function is well documented and really easy to work with, I find it way cleaner than trying to do it in the XLSform.