I agree up to a point. Debt used to acquire income producing assets is good debt. If what you are buying on credit does not produce income, that is bad debt if you carry a balance. Financing the purchase of a rental property is good debt if the rental income is paying off the loan. Using a credit card to buy groceries, a vacation, a restaurant meal, etc. is bad debt but only if you don't pay off the credit card statement balance in full each month.
Most would consider the mortgage on a primary residence a liability (because the asset does not generate income), but necessary debt to provide a roof over your head.
There is no magic number of loans or credit cards for a good credit score. What matters is your payment history and the length of your credit history and your % credit utilization. I see a lot of posts in this thread that claim there is a limit on the number of loans and credit cards you can have for a high credit score. I have 9 mortgages, and seven credit cards and two HELOCs that are treated as revolving credit lines. My credit score last month was 843 with a credit history of on-time payments for the past 30 years. My credit card utilization rate is under 10% right now only because I have some credit card balances at 0% APR. These balances will all be paid in full by the time the 0% promotional rate period expires.
A couple of years ago, one bank I use offered a 0% interest, $0 cash advance fee for a 13-month cash advance. I used the cash advance to borrow $25000, then used the money to buy a few CDs at my credit union. The credit union paid me 2% interest ($500) over the following 12 months. I made minimum payments ($250) to the credit card balance then paid the balance in full when the CDs matured. I just viewed that experience as receiving a $500 cash gift from my bank for being a good customer.
The point I am trying to make is credit can be your friend if used responsibily.