find correct number of elements shown