It is similar but .Pagination.Pagenumber
I think gives the number of the page in the sequence, not the number of pages that are displayed at the same time which paginate
configures.
But I think it might not be possible if this post from 2018 still is true Retrieve/test site global config. So this might be a duplicate if nothing has changed since then.
But thanks for the reponse!