vaidotasKumZa.PdfSharp.Activities throwng error when page count is 2 with 'Get page count' Activity

Please vote for the page count activity here: PDF Page Count Activity

Using that will allow you first figure out the page count and then deal with the pdf accordingly.