Prepare filling: Heat oil in a large skillet over medium heat. Cook and stir onions and mushrooms in hot oil until soft, about 15 minutes. Remove from heat and set aside.
Pass potatoes and farmer's cheese separately through a food grinder or food processor; place both in a large bowl. Add onion-mushroom mixture, sour cream, salt, and pepper; mix until well combined and set filling aside.
Make dough: Place flour on a clean work surface and form a well in the center. Crack eggs into the well. Add butter and a few tablespoons warm water. Mix with your hands, gradually adding more warm water, 1 tablespoon at a time, as you go. Knead until dough is soft and smooth, adding more flour to the work surface as needed.
Roll out 1/4 of the dough to an 1/8-inch thickness. Use a glass or round cookie cutter to cut out circles, saving any excess dough for your next batch. Place 1 teaspoon filling in the center of each dough circle. Fold dough over into a half-moon shape and pinch edges together to seal. Cover pierogi with a clean dish towel and repeat with remaining dough and filling.
Bring a large pot of salted water to a gentle boil. Cook pierogi in batches, about 20 at a time, in boiling water until they float to the surface, 10 to 15 minutes. Remove with a slotted spoon to a strainer to drain.