Why are you doing this recursively?
Instead, try this:
string[] files = Directory.GetFiles(@"D:\Temp\", "*.pdf", SearchOption.AllDirectories);
And it will return you all the PDF files in the whole branch, as strings with the complete file path.
Then you know how many there are before you even start processing them...