Statistics for Planck 2018 results VIII. Gravitational lensing