See the question and my original answer on StackOverflow

What you can do is use the Shell.Application object and the System.Document.PageCount standard Windows property, something like this:

$application = New-Object -com "Shell.Application"
$folder = $application.Namespace("c:\myFolder1\myFolder2")
$docfile = $folder.ParseName("myDoc.docx");
Write-Host $docfile.ExtendedProperty("System.Document.PageCount")

This is the equivalent of what you'll see in the Shell's Properties dialog, Details tab.

If Word is not installed at all, this method will only be able to read old Word files (.doc format).

For .docx file (Open Xml format), if Word is not installed, you can use Microsoft's Open Xml SDK. Just download the package from Nuget, extract it, and copy the DocumentFormat.OpenXml.dll somewhere (from net46 folder for example) on your disk. This is the only extra file you'll need.

Once you've done that, this other script will dump the page count:

[System.Reflection.Assembly]::LoadFrom("DocumentFormat.OpenXml.dll") | out-null
$doc = [DocumentFormat.OpenXml.Packaging.WordprocessingDocument]::Open("c:\myFolder1\myFolder2\myDoc.docx", $false)
Write-Host $doc.ExtendedFilePropertiesPart.Properties.Pages.Text