If some of the creatures are illegal targets as Biogenic Upgrade tries to resolve, the original distribution of counters still applies and the counters that would have been put on the illegal targets are lost. They won't be put instead on a legal target.