Count the number of times all Family's have been placed

Ok I know my code is nowhere close to being correct but I think I am on the right track. Not sure how fast python can collect and match all of the elements vs All Elements of Family. This is the closest stuff in the API I could fine.

Idea for the code was taking from All Instances from Element Type.

This is what I want to do but I just want a count of all the instances. Sorry for my pore coding.

import clr
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument

elemtype = UnwrapElement(IN[0])
cat = UnwrapElement(IN[1])

if not isinstance(IN[0], list): elemtype = [elemtype]
allelem = FilteredElementCollector(doc).OfCategory(cat)

count = []

for type in elemtype:
	for x in allelem:
		if x.FamilyType.GetType() == type:
			count.append(x)
			

OUT = FilteredElementCollector(count).GetElementCount()