I'm trying to figure out a best practice for determining what are the names of layers in a GeoPackage and counting the total number of them.
I've been able to list all the layers of a GeoPackage using
gdal info mypkg.gpkg but it only lists the layers, not count them.
The solution I need is not necessarily for scripting but simply for verifying whether my processes have successfully run. If there is a method to check via bash, QGIS3, Python, that would be very helpful.
EDIT: I should specify that the contents would include not only vector layers but raster layers as well.