Combine the flour and salt. Add in the water, eggs and butter continuing to mix until the mixture turns doughy. You may need to add an extra tablespoon or two of water if needed. Once the dough has formed, let it rest 15–20 minutes.
Place the cubed potatoes in a large pot and cover with water. Bring to a boil and reduce heat to medium. Simmer until tender, about 10–15 minutes.
While the potatoes are cooking, sautee the 2 chopped onions in the 2 tablespoons of butter until tender and set aside.
Drain the potatoes and stir in the sauteed onions, salt, pepper, and cream cheese. Set the mixture aside.
Divide the pierogies dough into 4 equal parts. Roll out one portion of the dough to about ⅛” thickness and cut with a 3” biscuit cutter. Place 2 teaspoons of filling in the center of the dough. Moisten the edges of the dough with water, fold over and gently seal them shut. Repeat this process with all the dough.
Bring a large post of water to a boil and then reduce heat to a simmer. Carefully add the pierogies to the water and let cook about 2 minutes or until then begin to float. Remove the pierogi from the water. Repeat this process.
Saute 4–5 pierogies at one time in the ¼ cup of onion and 1 tablespoon of butter. Serve with sour cream if desired.
If freezing, place the boiled pierogies on a baking sheet with wax or parchment paper and freeze until firm. Remove from the freezer and place in freezer containers. They can be stored in the freezer up to 3 months.