The following PowerCLI script will report the total number of virtual CPU's and MemoryGB per VM folder:
Get-Folder -Type VM |
ForEach-Object {
$Folder = $_
$VMs = $Folder | Get-VM
$Folder |
Select-Object -Property Name,
@{N="TotalNumCpu";E={$VMs | Measure-Object -Property NumCpu -Sum | Select-Object -ExpandProperty Sum}},
@{N="TotalMemoryGB";E={$VMs | Measure-Object -Property MemoryGB -Sum | Select-Object -ExpandProperty Sum}}
}