Kapteyn and Statistical Astronomy