scripts for counting histogram excesses