Quite a few? Quite a few less!
I suspect you're thinking of the Soviet N1 rocket, whose first stage, with 30 NK-15 motors, has got more than three times as many motors as the Falcon X Heavy's is supposed to get--noting, of course, that the XX and X Heavy are supposed to use the Merlin 2 motor, which is a pretty huge motor compared to the NK-15. That was, however, HARDLY the N1's only problem. No, there were plenty:
* Soviet inability to make bigger engines due to insufficient industrial capability, as well as any other problems with building a huge moon rocket, whose first stage has thirty freaking engines, which might follow from inadequate industrial capabilities. Dangerous engineering compromises to account for such shortcomings were pretty commonplace in Soviet engineering. Hell, just look at their RBMK power plants.
* Problems with the kind of plumbing you need to make the motors work on a rocket whose first stage alone has thirty motors; furthermore, the motors were of the closed cycle/staged combustion cycle variety, which are more efficient than earlier designs but require more complex plumbing--which is a problem when getting /any/ rocket with that many engines would be a pretty amazing feat of pipework.
* The Soviet tendency to test things as little as feasible, because testing is expensive and the Soviet Union was kind of poor. In addition to lack of funding, the rocket could not be assembled completely until it was at Baikonur Cosmodrome, which further restricted testing.
What do you get when you have a largely untested, underfunded, and spectacularly complicated design with a relatively new kind of engine, all made in a country that, by fiscal necessity, had to do everything pretty much everything as cheap and dirty as they thought they could get away with? In this case, some pretty spectacular explosions. There were so many things that could go wrong, and so few of them had been tested and corrected before launch. That's a recipe for fiery failure with /any/ rocket, let alone one over a hundred meters tall with several dozen motors and a maze of plumbing that'd make even the Mario Brothers run screaming.
SpaceX, by comparison, has good manufacturing capabilities, good metallurgy, extremely rigorous testing practices, and a simpler and more reliable design--both for the motors and the rockets as a whole. In general, SpaceX's stuff is simpler, less fragile, and better made, and SpaceX is a lot better about testing their rockets than the Soviet space program.