You tried and it didn't work:
Write-Host("...Found: $projectNodes.Count");
Wrap it in $():
Write-Host("...Found: $($projectNodes.Count)");