If you are charging your friend what you would charge a stranger (fair market value), then it would be income.
If you are just getting enough to cover the full rent and not enough to make a profit, then you don't have to claim it as income. But you also can't claim expenses either.