Limit amount of favorites

Extended the plugin with functionality to set a maximum to the amount
of favorites.