Arm64 Long Format Translation Table Walk

Hi all - I'm trying to understand stage 1 translation.

Assuming that the translation is starting at level 2, how do you determine the number of page table entries in the level 2 table? The documnetation says it can have up to 512 for 4kb granule size. I guess the same question goes for starting at level 1...is there a formula to finding this out?

I have a stage 1 translation that appears to have the following and I'm trying to make sense of it.
2ea level 3 tables each with 512 entries
1ea level 2 table with 48 entries