It's not a real rule, so much as a matter of "sounding natural." I strongly recommend you practice using the rule you were taught, but once you reach an advanced level, feel free to ignore it. Other things being equal, overuse of many / much actually sounds more formal, and overuse of "a lot of" sounds informal.