This took me days to work out how to do so I gotta share it:
How to get the word count from a MS Word Document:
<?php
#Instantiate the Word component.
$word = new COM("word.application") or die("Unable to instantiate Word");
$word->Visible = 1;
$word->Documents->Open("c:/anydocument.doc");
$temp = $word->Dialogs->Item(228);
$temp->Execute();
$numwords = $temp->Words();
echo $numwords;
$word->Quit();
?>
Note that this is the only way to get the word count accurately:
$word->ActiveDocument->Words->Count;
Will see all carriage returns and punctuation as words so is wildy innaccurate.