It looks like the pack files are detailed enough that they specify which bits are used for all instances of name="PORT" modules.
See the ATXMEGA64a4, which only uses half of PORTB
https://docs.rs/avrd/0.1.1/avrd/atxmega64a4u/index.html'
We could easily list the number of GPIOs in the documentation by counting the number of these.