Say I have a list like this
a={-7.61575, 7.5, -6.84206, 6.64598, 5.7654, -5.64823, 4.69842, -4.5, \
-1.86729 + 1.90939 I, -1.86729 - 1.90939 I, 0.905621 + 1.98443 I,
0.905621 - 1.98443 I, 0.631991 + 1.96227 I, 0.631991 - 1.96227 I,
0.327801 + 1.9312 I, 0.327801 - 1.9312 I}
How do I define a function that counts the number of real and complex entries 0n this list?
1. + 0. I
a complex or real number for you? $\endgroup${Head@#[[1]], #[[2]]} & /@ Tally[a, Head[#1] === Head[#2] &]
$\endgroup$