astropy_healpix.
nside_to_npix
Find the number of pixels corresponding to a HEALPix resolution.
nside : int
The number of pixels on the side of one of the 12 ‘top-level’ HEALPix tiles.
npix : int
The number of pixels in the HEALPix map.