To prepare the pierogi dough, mix together the flour and salt. Beat the egg, then add all at once to the flour mixture. Add the 1/2 cup sour cream and the softened butter pieces and work until the dough loses most of its stickiness (about 5-7 minutes). You can use a food processor with a dough hook for this, but be careful not to over beat. Wrap the dough in plastic and refrigerate for 20-30 minutes or overnight; the dough can be kept in the refrigerator for up to 2 days. Each batch of dough makes about 12-15 pierogies, depending on size.To make the filling: boil the cubed potatoes until soft. While the potatoes are boiling, saute the onions in butter until soft and translucent. Mash the potatoes with the sauted onions , add 4-8oz of grated cheddar cheese (depending on how cheesy you want your pierogies), adding salt and pepper to taste. Let the potato mixture cool and then form into 1" balls.
To make the pierogies:Roll the pierogi dough on a floured board or counter top until 1/8" thick. Cut circles of dough with a cookie cutter or drinking glass. Place a small ball of filling (about a tablespoon) on each dough round and fold the dough over, forming a semi-circle. Press the edges together with the tines of a fork. Gently shape the filling inside the dough to elongate it slightly, you don't want the filling just in the middle of the pierogi but in the whole length of it.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.Saute chopped onions in butter in a large pan until onions are soft. Then add pierogies and pan fry until lightly crispy.