For the purposes of litigation/jurisdiction, individuals can only have sole residency. That is, you are the resident of only one state. Unless you are a business organization, in which case you can have more than one residency. But if that’s the case, how are you reading this without eyeballs?
You are a resident of the state where you live and intend to stay. If you live in a state where you don’t intend to stay, you aren’t a resident of that state. The case in all the hornbooks is Mas v. Perry, 489 F. 2d 1396 (5th Cir. 1970). In that case, the court needed to determine a woman’s citizenship, and thus her residence. She was from Mississippi, but going to school in Louisiana. She’d been living in Louisiana for two years. The court found that she had no intent to stay there, so her residence was still Mississippi. They analyzed all kinds of stuff to determine what her intent was. There’s now a laundry list of things used to determine residency. The fact that you live in a state is important, but it isn’t the deciding factor.
Again, this is just for determining residency for the purposes of jurisdiction. For the purposes of college tuition, military recruitment, etc., there are other standards.