Peel the onions and slice thinly.
Slice the garlic thinly.
Wash, dry and stem the thyme. Chop it finely.
Bake the slices of country bread on a sheet pan in a very low oven until dry and crispy.
In a large soup pot set over medium heat, sweat the onions and garlic with the butter, stirring often, until richly colored.
Add the sherry, increase the heat and cook until the sherry is almost completely reduced.
Add the white wine and reduce by half.
Add the thyme, bay leaf, chicken stock and duck demi-glace (if using) and bring to a simmer.
Simmer to combine the flavors, about 20 minutes.
Carefully skim the soup to remove any fat.
Correct the seasoning with salt and pepper.
Ladle the soup into individual soup bowls.
Top first with the crouton and then with a nice layer of Comté cheese.
Heat under the broiler until crusty and golden.
Serve immediately.
