nilpotentCount:= function(R) local n; n:= Size(R); return Length(Filtered(Elements(R), i -> IsZero(i^n))); end;