How do I count the number of elements in a list which are between two determined values?
n = 10000;
list = RandomReal[{0, 1}, n];
a = 0.3;
b = 0.6;
UnitStep[list - a].UnitStep[b - list]
This isn't as fast as the UnitStep method given by Henrik, but for many applications having the most efficient method isn't necessary.
Length @ Select[list, Between[{a, b}]]
or
Count[list, _?(Between[{a, b}])]
Total@Boole[a <= # <= b & /@ list]