I'll share how I was able to make this work. If anyone has a better way, please share.
On our build server, run AstroGrep to search the .csproj files for code analysis being set to true.
Copy to Excel and use a formula to display a 1 if the path contains “main.”
Note: The reason I used "main" is because all of our main trunks have the word "main" in the folder structure. This eliminates counting all the release versions.
Formula: =IF(ISNUMBER(SEARCH("main",A1)), 1, 0)
Count the total for Core and for Apps (our two main team projects), and there’s your number.