How many licenses do I need in my federation?
Short answer: Principally one is enough!
Detailed answer: You only need a Federation for Jira license on that instance, where you want to access the functionality of the Federation for Jira app. From that Jira instance, Federation for Jira will reach out to all other Jira instances in your federation, connected by Application Links.
On which Jira instances do I have to install the Federation for Jira app?
Only on those instances, where you want to access the functionality of the Federation for Jira app, for example the /wiki/spaces/FED/pages/12386528.