Both count. The money does not have to be salary or rent. Transfers from family and remittances from abroad are fine, and a large part of most files from Nepal, Pakistan and India is exactly that.
What changes is what has to sit behind them. Money that lands as a transfer needs a person attached to it: their occupation, their relationship to you, how many dependants they have, the amount they are giving, and a copy of their ID. Ideally their own statements too, showing they had the money to give in the first place.
The pattern that causes trouble is not the source, it is the shape. A large amount appearing a few weeks before you apply, in an account with no history and nobody documented as the sender, reads very differently from the same amount arriving steadily with a named person behind it. Money moving between your own accounts is fine as well, as long as it can be traced back to where it was earned.
So the question to ask of every figure in your file is not where it came from. It is whether someone reading the statements could follow it back to a person or an income without having to ask you.
This is community experience, not legal advice. For your own file, speak to a licensed consultant or lawyer.