Adding a function to get the provider count