For an approximate total content size for a Site Collection using PowerShell:
Get-SPSite http://yourServer/sites/yourSite | select StorageUsed
The same from REST API:
http://yourServer/sites/yourSite/_api/site/usage
Count and size for a single library (excluding versions):
Get-SPSite http://yourServer/sites/yourSite |
select -ExpandProperty lists |
where Title -eq "Documents" |
select -ExpandProperty Items |
select -ExpandProperty File |
measure -Property Length -Sum
Count and size of files for an entire Site Collection (excluding versions, list content, and "other"):
Get-SPSite http://yourServer/sites/yourSite |
Get-SPWeb -Limit all |
select -ExpandProperty lists |
select -ExpandProperty Items |
select -ExpandProperty File |
measure -Property Length -Sum