ex 1.1.15 - histogram to count array element value instances