MATLAB cell counting