Improving the histogram samples count