If you're looking for an ArcGIS solution and you have a bldg footprint polygon layer as your pic indicates, then it may be relatively straightforward to:
1- Perform a spatial join, parcels (source) to bldgs (target) so that your bldgs layer will 'inherit' the parcel IDs of your parcel layer.
2- Add a new numeric field for which to calculate the bld nos.
3- Run the following script which opens an update cursor on the output spatial join fc based on a sort of the parcel ID field. The script is untested, errors are not trapped - comments are included in the code, so modification as required should be easy.
import arcpy
# ---set a few variables in-between the 2 symbols: <>
# (remove the symbols, no spaces or special char between the quotes)
# your workspace:
arcpy.env.workspace = r'< your workspace pathname >'
# your output fc from the spatial join:
fc = '< your spatial join output fc name >'
# your fieldname for parcel ID:
parcelID = '< parcel id fieldname >'
# your new fieldname for housing the newly assigned bldg number:
bldgNO = '< bldg number fieldname >'
# STOP - no more variables to assign
# the following var is for providing the sort string in UpdateCursor
sort = parcelID + " A"
# create the update cursor object
cursor = arcpy.UpdateCursor(fc, '', '', '', sort)
# initialize counter 'i' and current value 'currentVal' for parcel ID
i = 0
currentVal = ''
# process each row represented by 'bldg'
for bldg in cursor:
# successive parcelID equiv to currentVal, bldg i
if bldg.getValue(parcelID) == currentVal:
bldgNumber = i
# set the bldg val in the table
bldg.setValue(bldgNO, bldgNumber)
# update row object
cursor.updateRow(bldg)
# increment i
i += 1
else:
# re-init i (currentVal is '' for 1st row, otherwise not equiv to parcel ID)
i = 1
# set the bldg val to 1 in the table
bldg.setValue(bldgNO, i)
# update row object
cursor.updateRow(bldg)
# set currentVal to the current parcel ID used for next row val comparison
currentVal = bldg.getValue(parcelID)
i += 1
# finally, del objects to remove locks on data
del bldg
del cursor