These programs sort buildings in an OSM file then count them. They are not intended to replace the normal GIS tools that are often used but were written to extract more basic information about buildings. They do create a CSV file which can be imported into a spreadsheet to create graphs.
Buildings associated tags descending sortbuilding 320,496
Building types descending sort
The first only handles ways not nodes.
It takes two parameters the full path and file name and the output folder.
osmbuildingcount c:\osmwork\stottbase.osm c:\osmwork\
The defaults if no paramters are given are c:\osmwork\stottbase.osm and the output is in C:\osmwork
The executable is here:
The sln file for Visual Studio 2017 C# source is here:
The source is here:
Download the .osm file from here: http://download.geofabrik.de/
Use osmconvert64 to first convert .pbf to .osm and then to extract the area of interest.
osmconvert64 c:\downloads\malawi-latest-internal.osm.pbf -o=c:\maps\malawi.osm
osmconvert64 c:\maps\malawi.osm -b=32,-17,37,-16 -o=c:\maps\malawi1.osm