When retrieving document information by using the .NET API, the data for DWPAGECOUNT returns an incorrect number.

DWPAGECOUNT would not provide the total number pages of all files that comprise a document. 
This particular system field will provide the number of total files which are clipped together for that document.

We can access the total number of pages of a document by implementing something such as the following, 

var totalPages = Document.totalpages;

KBA applicable for both Cloud and On-premise Organizations.