Check out example codes for "number of values lager than matlab". It will help you in understanding the concepts better.

Code Example 1

x=50*rand(7);
a= x > 21;
numel(a(a>0))

Learn ReactJs, React Native from akashmittal.com