Hi,
I think the main question was about "There are X questions in the survey".
This can be included in the welcome text with an individual wording.
The progress bar is something different.
Even if you have some options that affect the calculation, it never will be correct.
Here an example of a commercial tool
In each question you may set either the total percentage or a step that is added to the previous value.
But it usually will fail if there are loops or different routings and extensive filters.
Example:
Before the loop you finished 50% of the survey.
After the loop 70%.
The maximum number of loops is 10, So each loop will add 2% to the progress bar.
But the respondent only is asked two loops. So the progress bar will jump from 54% to 70%.
Or if you completed 20 questions of 50. So the progress bar is at 40%.
Now there is a question that makes you jump over the next 25 questions. The progress bar will jump to 90%.
In my opinion there is no satisfying solution if the decision whether a question is displayed or not is made during the survey.
But questions with an initially setting "Don't show this question" should be considered.
Therefore you will read very frequently "Do not use progress bars if you want to design a good survey"
Joffm