I suspect that it says that you have 2 "associated" devices rather than 2 "authorized" devices. An iPhone cannot be an authorized device but can be an associated device. Only computers can be "authorized" devices.
For information about the difference, see: Authorization vs. association - Apple Community
To solve the authorized device issue, deauthorize all and then authorized any computers that you still have and want to use. See the following from Authorize or deauthorize your computer for iTunes Store purchases - Apple Support
To deauthorize a computer that you don't have access to, you have to deauthorize all of your computers. Then authorize each computer that you have again. You can deauthorize all computers only once a year.
- Open iTunes.
- Choose Account > View My Account.
- Sign in with your Apple ID and password. Forgot your Apple ID?
- At the top of your Account Information page, go to the Apple ID Summary section.
- Next to Computer Authorizations, click Deauthorize All.
- Authorize each computer that you use again.