I'm not sure if this is what you are looking for but you can create a custom agg function like:
pd.NamedAgg(column="Model Year", aggfunc=lambda x: np.count(x))
or
pd.NamedAgg(column="Model Year", aggfunc=lambda x: len(x))