The rank of variants of nilpotent pseudovarieties