Melt the butter in a large Dutch oven until bubbly, then cook the onions over medium low heat, stirring occasionally, until they are caramelized, roughly 15 minutes.
Deglaze the pan by pouring in ¼ cup white wine and stirring constantly for two minutes to scrape up the golden-brown fond from the pan.
Pour in the chicken stock and pickle juice, then add the pickles, carrots, potatoes and ham to the broth. Bring to a boil, then simmer until the potatoes are fork tender.
Measure out 1 cup of sour cream into a medium-sized bowl and slowly add the flour. Stir well to combine.
Temper the sour cream by adding ½ cup of the hot soup to the sour cream mixture, whisking constantly. Add another ½ cup and whisk until the mixture is well blended and all the same temperature, then add it to the big pot. This technique helps prevent the sour cream from curdling when it's added a hot liquid.
Turn the heat down to a simmer and add the pepper and sugar. Taste it then add salt to taste and adjust other seasonings as desired. Cook on medium low for another 5 minutes.
Serve warm with a garnish of fresh dill, a crack of black pepper, pickle coins, and a drizzle of sour cream.