[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null 
function global:Get-SPSite($url){ 
    return new-Object Microsoft.SharePoint.SPSite($url) 
#Get the web application 
$WebAppURL= "<web App URL>" 
$SiteColletion = Get-SPSite($WebAppURL) 
$WebApp = $SiteColletion.WebApplication 
$ResultColl = @() 
#Loop through all site collections of the web app 
    foreach ($site in $WebApp.Sites) 
       # get the collection of webs 
       foreach($web in $site.AllWebs) 
            #write-host "Scaning Site" $web.title "@" $web.URL 
               foreach($list in $web.lists | Where { $_.ContentTypes[0].ResourceFolder.Properties["_ipfs_infopathenabled"]}) 
                    Write-Host "Found an InfoPath List Form at: $($Web.URL), $($List.Title)" 
                    $Result = new-object PSObject 
                    $Result | add-member -membertype NoteProperty -name "Site URL" -Value $web.Url 
                    $Result | add-member -membertype NoteProperty -name "List Name" -Value $List.Title 
                    $Result | add-member -membertype NoteProperty -name "List URL" -Value "$($Web.Url)/ 
                    $Result | add-member -membertype NoteProperty -name "Template" -Value $list.ContentTypes 
                    $Result | add-member -membertype NoteProperty -name "Item Count" -Value $list.ItemCount 
                    $Result | add-member -membertype NoteProperty -name "Last Modified Date" -Value  
                    $ResultColl += $Result 
#Export Results to a CSV File 
$ResultColl | Export-csv $ReportOutput -notypeinformation 
Write-Host "InfoPath Lists Forms Report has been Generated!" -f Green 

This script will loop through a web application and find all the InfoPath forms that are used in lists.  There is a separate script to find all the InfoPath form libraries within your web app.  The script will output the results to a csv file and will include the item count of the list and last modified date.  This is useful when migrating to O365 and any testing/remediation that is needed.