The Huawei P20 comes with a 40MP main camera. Although the pixel count might seems too high, the good news is that this camera uses a large 1/1.7-inch sensor (some website provide a more accurate 1/7.3-inch specification). We don't get to see such a larger sensor on mobile phones every day. A 1/1.73-inches sensor measures 7.76 x 5.82 mm in size (according to the official P20 Pro page on Huawei.com). We did see 1/2.3-inch sensors in smartphones, which its sizes measures approximately 6.17 x 4.55 mm. So the 1/1.7-inch sensor is even larger than the 1/2.3-inch one. The 1/2.3-inch one was very popular on standard compact digital cameras.
The 1/1.7-inch sensor is the same size of sensor you find in digital cameras like the Panasonic DMC-LX7, Nikon P7000 and Canon S110 digital cameras.
Here is an image from camera debate website that demonstrates the relative size difference between the two sensors, compared too much larger sensor found in interchangeable lens cameras like mirrorless and DSLRs.
As you can see, the 1/1.7-inch sensor is slightly larger than the 1/2.3-inch.
Just for comparison, the iPhone 8, iPhone 8 Plus and iPhone X rear camera features a 1/3-inch size sensor, which is 4.8 x 3.8 mm in size, significantly smaller than the 1/1.7 inch sensor.
This sensor comes with 40-megapixel, but the camera supports pixel-binning which can overcome the negative effect of the smaller pixels by utilizing neighbor pixels to form a larger pixel made of several pixels. That data from those pixels is used to represents a single pixel in the final image, thus improving the low-light performance of the sensor, at the cost of reduce resolution (10MP).