For the sauerkraut filling: melt the butter in a medium frying pan over medium heat. Cook the onion, stirring, about 5 minutes or until soft. Add the drained sauerkraut and cook for 5 minutes. Season to taste with salt and pepper; transfer to a bowl. Cool.
For the potato filling: melt the butter in the same pan over medium heat. Cook the onion, stirring, about 5 minutes or until soft. Stir into the mashed potatoes; season with to taste with salt and pepper.
For the dough: beat together the eggs and sour cream in a large bowl until smooth. Sift together the flour, salt and baking powder; stir into the sour cream mixture until dough comes together. Knead the dough on a lightly floured surface until firm and smooth. Divide the dough in half, then roll out one half to 3mm thickness. Cut 8cm rounds from dough using a biscuit cutter.
Place a small spoonful of the mashed potato filling into the centre of each round. Moisten the edges with water, fold over, and press together with a fork to seal. Repeat with the remaining dough and the sauerkraut filling.
Bring a large saucepan of lightly salted water to the boil. Add perogies and cook for 3 to 5 minutes or until pierogi float to the top. Remove with a slotted spoon.