cfoss count MATLAB