Can 只有 be used in this context?
“只” means “by no means more than”，“only”.
If you add this word, this means you have no more than ……, at most I have……

Compare:

1) I have no more than 2 dresses（我**只有**2件衣服）

2) I have 2 dresses（我有2件衣服，可能还有，但是未提及）