  We show that for each n-tuple of positive rational integers (a_1,..,a_n)
there are sets of primes S of arbitrarily large cardinality s such that the
solutions of the equation a_1x_1+...+a_nx_n=1 with the x_i all S-units are not
contained in fewer than exp((4+o(1))s^{1/2}(log s)^{-1/2}) proper linear
subspaces of C^n. This generalizes a result of Erdos, Stewart and Tijdeman for
m=2 [Compositio 36 (1988), 37-56].
  Furthermore we prove that for any algebraic number field K of degree n, any
integer m with 1<=m<n, and any sufficiently large s there are integers
b_0,...,b_m in a number field which are linearly independent over the
rationals, and prime numbers p_1,...,p_s, such that the norm polynomial
equation |N_{K/Q}(b_0+b_1x_1+...+b_mx_m)|=p_1^{z_1}...p_s^{z_s} has at least
exp{(1+o(1)){n/m}s^{m/n}(log s)^{-1+m/n}) solutions in integers
x_1,..,x_m,z_1,..,z_s. This generalizes a result of Moree and Stewart [Indag.
Math. 1 (1990), 465-472].
  Our main tool, also established in this paper, is an effective lower bound
for the number of ideals in a number field K of norm <=X composed of prime
ideals which lie outside a given finite set of prime ideals T and which have
norm <=Y. This generalizes a result of Canfield, Erdos and Pomerance [J. Number
Th. 17 (1983), 1-28], and of Moree and Stewart (see above).
