The (count of buckets) must be the (count of bounds)+1.
Here in DataGenerator.FakeHistogram they are both set to 10.