It is do-able in Dynamo- but probably easier to let Excel deal with the counting and grouping- it is pretty good at that.
If you export a list of all the structural framing members to Excel, then in a separate worksheet or even a separate Excel file, link in the data. This means you can just overwrite the ‘data’ worksheet or file each time you run it, then refresh the ‘summary’ to get the current data
I used a pivot table in Excel in the below example to do this.
20180309 structural member count.dyn