Does using different addresses affect subsequent transaction size, given the same number of inputs? I'm quite confused about the input count that affect the transaction size, example:

x1 = my receive btc address

x2 = my another receive btc address

x3 = my another receive btc address


Scenario A

P1 send 1 btc to address x1

P2 send 1 btc to address x1

P3 send 1 btc to address x1

Scenario B

P1 send 1 btc to address x1

P2 send 1 btc to address x2

P3 send 1 btc to address x3

So my wallet will have total balance 3 btc.

My question is when I try to send 3 btc to P4 (Another user), scenario A will count as 3 inputs or scenario B will count as 3 inputs or both is same 3 inputs?
Transaction inputs need to reference the Unspent Transaction Output (UTXO) they are spending with the outpoint of that UTXO. The outpoint is the transaction id of the transaction that created the transaction output concatenated with a colon and the output position in that transaction: txid:vout.

Let's say you were sent 1 BTC by P1 to address x1 in transaction uiaex and it was the second output (vout = 1 because we start counting at 0), the corresponding outpoint would be uiaex:1.

The UTXO reference therefore is independent of the address that the funds were sent to previously.

The transaction size is therefore the same whether you received all outputs to the same address or different addresses. There are no savings in transaction size by receiving funds to the same address multiple times.