function L=zero_count(s);

N=length(s);
mz = [];
for k=1:N-1
   if (s(k)*s(k+1)<0)   
      mz=[mz k+1];
   end
end

L=length(mz)+length(find(s==0));
