If you iterate over the oppents, you can build counters for subtotals. It'll be up to you in the user interface to Sort, Group, and Filter the list to your liking. Any other field values from oppents that you might want to group on or whatever can be fetched during your loop, also. You'll define new fields in Organizations to hold all these values.
I don't remember where the best examples for this are; maybe in Actions, but the Trigger Examples page has the most examples, and one of them might be better.
Thanks Bill. I appreciate very much your support.
var libOps = libByName("Oportunidades"),libEmp = libByName("Empresas"),entOps = libOps.entries(),entEmp = libEmp.entries();for (var i in entEmp) {nameEmp = entEmp[i].field("Nome");count=0;for(var j in entOps)for (var k in entOps[j].field("Empresa")) {if (entOps[j].field("Empresa")[k].field("Nome") == nameEmp)count += 1};entEmp[i].set("NumOps",count);}