final fix for counting service instances in service discovery