Cook cabbage in salted boiling water 10 minutes. Drain; cool; chop cabbage. Sauté onions in butter for 12 minutes. Add cabbage; cook, stirring, 15 to 20 minutes. Add salt, pepper. Let cool. Mix with cheese in a bowl.
Boil potatoes until tender, 15 minutes. Reserve 1/2 cup cooking water; drain potatoes. Mash with 2 tablespoons butter and enough cooking water for stiff texture. Let cool. Sauté onions in remaining butter 12 minutes. Add onions, cheese, salt and pepper to potatoes.
Mix cheese, yolks, sugar, salt and pepper in a bowl.
Put flour in clean bowl. Make well. Add eggs, salt, butter mixture; stir until flour is incorporated (add warm water if too stiff). Knead 15 minutes, until smooth and elastic. Halve dough. Wrap each half in plastic wrap. Let rest 30 minutes. Roll out half of dough to 1/16-inch thickness on lightly floured board. Cut out 3-1/2-inch circles. Place scant tablespoonful of desired filling a little off-center on each round. Brush edge of round with water. Fold over dough; press edges together to make half moons. Press fork tines around edges to seal. Gather dough scraps; knead. Make more pierogi. Repeat with other half of dough.
Drop pierogi into salted boiling water. Cook gently until they float to the top, 5 to 7 minutes. Remove with slotted spoon to clean towel to cool; after 5 minutes, turn over.
Thaw pierogi in boiling water for 3 minutes, or thaw in refrigerator. Cook in butter, or in butter with onions, until lightly golden. Or, place frozen pierogi in microwave-safe dish; cover with plastic wrap and vent. Microwave on medium-high (70 percent) for 2 to 3 minutes or until soft and hot. Then fry in butter, if desired. Makes about 100 pierogis.