Prepare the Dough
Combine flour and salt in a large mixing bowl. Combine the egg and sour cream in a separate bowl and combine it well. Add wet to dry ingredients with 1/4 cup of the softened butter pieces and work until the dough loses most of its stickiness (about 5-7 minutes). You may use a food processor with a dough hook for this, but be careful not to overbeat. Wrap the dough in plastic and let rest in the refrigerator for 20-30 minutes or overnight.
Prepare the Filling
Peel and boil potatoes until soft. While the potatoes are boiling, finely chop one of the onions and saute in 2 tbsp. butter until soft and translucent. Drain potatoes and remove to a large mixing bowl. Add the sauteed onions. Mash the potatoes and onions together with a potato masher. Add grated cheese. Salt and pepper to taste. Mix in parsley. Let the mixture cool and then form into 1" balls.
Prepare the Pierogies
Roll the pierogy dough on a floured board or countertop until 1/8" thick. Cut circles of dough with a cookie cutter, a wide-mouthed drinking glass or a clean empty food can.
Place a ball of filling on each circle of dough and fold the dough over, forming a semi-circle. Press the edges together with the tines of a fork.
Boil the pierogies a few at a time in a large pot of water. They are done when they float to the top (about 8-10 minutes). Rinse in cool water and let dry.
Finely chop the remaining onion and saute in 2 tbsp. butter in a large frying pan until onions are translucent. Add pierogies and pan fry until lightly crispy. Serve with sour cream.