In a frying pan sauté the leeks in 2 tbs olive oil for about 10 minutes, until softened. Season with salt, pepper and rosemary. Transfer the leeks to a large bowl.
Use the same pan (without washing it) to cook the spinach in the remaining olive oil until soft. Add some salt. Transfer to the bowl with the leeks.
Grate the yellow cheese and add it to the spinach and leeks. Crumble the white cheese and add it to the same mixture. Add the eggs and stir the ingredients in the bowl until everything is mixed well.
Preheat oven to 390 degrees F/ 200 degrees C. Grease a 10 inch/ 26 cm spring form pan and cover it with a sheet of parchment paper.
Lay 1 filo sheet on the prepared baking pan so that part of the sheet is hanging outside (see photos). Brush it lightly with butter. Lay another sheet next to the first one so that they are overlapping. Repeat the process until the bottom of the pan is covered with filo sheets. Spread the spinach and leeks mixture inside the pan. Fold the excess ﬁlo pastry inwards to enclose the ﬁlling. Brush the top with the remaining butter.
Bake for 30-40 minutes or until golden brown.
You need about 8-10 filo sheets. If they are very thin, you can use two sheets at a time and fold them together.
Instead of feta you may use ricotta, cottage cheese. I made my pie with Bulgarian sirene which is similar to feta.