We show that every finite algebra, which is finitely related and lies in a congruence modular variety, has few subpowers. This result, combined with other theorems, has interesting consequences for the complexity of several computational problems associated to finite relational structuresthe constraint satisfaction problem, the primitive positive formula comparison problem, and the learnability problem for primitive positive formulas. Another corollary is that it is decidable whether an algebra given by a set of relations has few subpowers.1991 Mathematics Subject Classification. 08B10,08A70,08B05,68Q25.