"She had many opportunities to increase the number of her contacts while traveling in different countries in Europe."
Is "the number of" redundant?
No.
"Proponents of the bills contend that doctors tend to increase referrals to medical services in which they have a financial interest, thereby driving up medical costs"
According to the answer to first post, would "the number of" be necessary between "increase" and "referrals"?
"the number of" is correct; it's like saying "the amount of".
It appears that "the number of" is randomly used without rules.
How do I know when to put "the number of" in the "increase ____ (some count noun)" clause?
Then, "increase referrals" is grammatically wrong?
It's not a matter of being grammatically wrong; it's more a matter of style. There are those who agree with Bennevis, "You cannot increase referrals. But you can increase their number". On the other hand, there are over 400 citations in the Google Books Corpus.
If you want to please the purists, use 'number'; however, if you don't, you'll be in good company.