With a transformer, you don't 'optimise' the number of turns, you use the minimum number of turns possible, so as to use as little wire, that will meet the magnetic requirements of the core.
That's a big core you have there, so I'll assume it's made of iron, and is for 240v mains. Obviously as assumptions become clearer, any wrong assumptions and the resulting maths can be corrected.
You have to have enough turns on the core so that changes in field in the core can generate a voltage equal to the input.
Any iron core should support 1.5T peak comfortably. At mains frequency of 50Hz, the field is changing at a peak of \$2\pi fB_{max}\$, so 6.3x50x1.5 = 472 T/s. High quality iron may support more, perhaps 1.7T, but 1.5 is a safer limit.
That field is operating over the cross sectional area of the core, which is 42mm * 66mm, to give a peak flux change of 472*66m*42m of 1.3Weber/s. There will be some insulation within this cross section, say approaching 10%, so we'll reduce the 1.3 down to 1.2 for safety.
This toroidal core will therefore generate up 1.2v per turn peak, at 50Hz (20% more at 60Hz).
For a maximum input voltage of 240v rms = 340v peak, you will need at least 283 primary turns. You could use more, to reduce the field. As you want to make a steplizer, it's possible your input voltage may at times be higher, so you should increase the number of turns to match your specification.
A rule of thumb for current density in modest sized transformers is 3A/mm2. 3mm diameter wire has an area of 7mm2, so you should get 20A through this wire with modest heating. 20A * 240v is 4.8kVA.
The toroid has a hole of 86mm diameter, which is an area of 5800mm2. A fill factor of 50% would be extraordinarily good going, so don't assume you can put more than 2900/7 = 400 turns of 3mm wire through it.
It sounds like you have the right size of wire and right size of core for a 3kVA 240v auto-transformer, can you confirm mkeith's surmises?