You can find the number of times an eigen value is repeated as follows.
A = [1 1 0 0;0 1 1 0;0 0 1 0;0 0 0 3]; E = eig(A); u = unique(E); R = histc(E,u)-1;
Output is:
E = 1 1 1 3
u = 1 3
R = 2 0
NOTE: if R(i) = 0, eigen value is not repeated, but has occurred only once in vector E.