I am trying to get a total of the items appearing via the Where-Object in the Format-Table below, but cannot find a way.
$fields = @{Label = "Book Title"; Expression = {$_.PSChildName}; Align="Left"},@{Label = "Base Directory"; Expression = {$_.Directory }; Align="Left"}
Get-ChildItem c:books -Recurse -Filter *.txt |
Where-Object {$_.PSChildName -match anyname} |
Format-Table $fields -Auto