Basic document stats computation