if you change the line where it add the total nicks to:
set %power.powerover %power.powerover + $nick($chan(%power.chan.counter),0,a,o)
it will give olny nicks that are not opped. also you can use some while statements to help clean up the code a little and use the /inc command.