Many years ago (2003, maybe?), I worked out a maximum-likelihood method for choosing the best possible binning for a histogram of discrete data. It is based on leave-one-out cross-validation. This has slept in my CVS repository until today, when I was about to post it to arXiv. Of course, just as I was beginning to post it I found this paper, with which I don't totally agree but which is clearly highly relevant (along with a number of papers referenced within it), so I will post tomorrow.