You can use the script below. It may take a while to finish depending on how many users and devices you have, but it will return for each UPN the number of devices they have.
$Result = @()
$Users = Get-AzureADUser -All $true | Select UserPrincipalName,ObjectId
ForEach ($User in $Users) {
$Devices = Get-AzureADUserRegisteredDevice -ObjectId $User.ObjectId
$Result += New-Object PSObject -Property @{
UserPrincipalName = $User.UserPrincipalName
DeviceCount = $Devices.Count
}
}
$Result