pyRevit

Code
Library
Count Furniture by Rooms
from collections import defaultdict
# Get Last Phase of the project
all_phases = FilteredElementCollector(doc).OfClass(Phase).ToElements()
last_phase = list(all_phases)[-1] #Ensure correct phase here
# Get All Furniture
all_furniture = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Furniture).WhereElementIsNotElementType().ToElements()
# Sort Furniture by Rooms
dict_furniture = defaultdict(int)
for furn in all_furniture:
try:
room = furn.Room[last_phase] # Get Room where furniture is placed in the last phase.
dict_furniture[room.Id] += 1
except:
print('Furniture [{}] Has No Room in Phase : {}'.format(furn.Id, last_phase.Name))
# Print Results
for room_id, count in dict_furniture.items():
room = doc.GetElement(room_id)
if room: print(room.Name, count)
else: print("No Room: {}".format(count))

⌨️ Happy Coding!
Erik Frits