Recognition of pathogens relies on the diversity of immune receptor proteins. Recent experiments that sequence the entire immune cell repertoires provide a new opportunity for quantitative insight into naturally occurring diversity and how it is generated. I will show how applying statistical inference to recent experiments that sequence entire immune repertoires we can quantify diversity of this functional ensemble. I will discuss these results from the perspective of optimal repertoires.