'Is there a way to include the feature count in the legend next to each category item in a seaborn plot?

I am working on a pandas dataframe with categories (Number) that I am plotting in a scatterplot with a regplot overlay for the trendline:

sns.regplot(x=avg, y=guess, data=data_df, scatter=False)
plt.legend(title="Number:", labels=["Trend Line","0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"])

I would like to know if I could have the count of features within each category displayed in the legend next to each item?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source