terrainTileCount

fun terrainTileCount(bounds: GeoBounds, maxZoom: Int): Long(source)

How many tiles TerrainRegionExtractor.download asks for over bounds up to maxZoom: the global tier, plus the regional tier for every tile past it. An upper bound, since a z6 tile with no regional archive fetches nothing. Counted from tile corners, O(1) per zoom, so it is safe to call before deciding whether a download fits.