What counts toward LoC for license purposes is the Lines of Code of the largest branch of each project. It appears that Lines of Code aren’t even calculated for branches, so no they don’t raise your license cost.
The line count of a project in SonarQube is the same as the line count of the largest branch. In case a project has no branches scanned, only PRs, will the LoC be based on the largest PR? Taking into account what you write above, this means such a project most likely has a rather large LoC, since also empty lines etc are counted?
Empty lines are not counted. Only ‘Lines of Code’ are counted. The docs should help.
The main branch counts as a ‘branch’ for these purposes. I’m not enturely certain it’s possible to analyze a PR with no branches (not even main) analyzed.