This question will open the proverbial "can of worms"!!
You will find that there is a great deal of disagreement on this forum, not so much as to whether or not bottom feeders "count" at all (so, if you have all bottom feeders you can keep an infinite # of them in any size tank? I think not!
), but as to whether or not the inch per gallon rule is a good rule of thumb or a ridiculous bunch of hooey.
My opinion, and I am only giving it here because no one else has jumped in yet
(well, I see that while I was writing this you did get some answers, but I'm not going to change this whole thing now -- we all seem to agree anyway), is that "it depends". First of all, of course they count. Many bottom feeders grow to be quite large fish, and from what I have heard, many are also "messy". Granted, cory cats are worth their weight in clean-up detail, but as you say, they do produce waste just as the other fish do, so although their total 'bio-load' may be less than a fish of similar mass that simply eats what floats and poops, the bio-load does exist, so saying they don't count is silly (no offense to your friend)
To my thinking, beginners are told "one inch per gallon" like it's our mantra simply because they are less likely to overload their water chemistry (which is not fully mature for about six months) if it is emphasized that overcrowding is a bad thing. It takes time for the nitrifying bacteria to develop, and more time to "catch up" every time you add fish, plus the fish are growing, and it is keeping up with that, and so forth.
On the other hand, lots of more experienced fishkeepers have crowded tanks, especially those that breed, like CM. They increase filtration, have lots of healthy plants, test their water regularly, do extra vacuuming and water changes, whatever they find that it takes to keep their particular fish happy and healthy. Different fish have different needs, and someone experienced will know that and act accordingly. 8)
The beginner generally will have a difficult enough time getting his/her tank parameters stable and at acceptable levels and keeping them that way until they've been at it a while to really spend a great deal of time/effort learning the idiosyncrasies of a bunch of different fish, which is why fishkeepers tell them to get hardy fish -- so they don't kill them off right away and get discouraged.
So what people will ask you is, what other fish are in the tank? What kind of filtration are you using? How often do you do water changes, and how much do you replace? Do you have live plants? What are your parameters? And so forth. Then they will either tell you that you can have ten cory cats without a problem (jk--lol) or that you may need to add a second filter or do more vacuuming or add some plants, something like that.
So the good news is, corys count, but you can have more, if you're willing to take the advice of whomever comes along and provides it.