How to tell how many affixes an item can have?
Solution 1:
The item suffix and prefix ALWAYS depend on the item level, never the character level. To find out what the item level table is, you need to look at the monster level to find out what the item pool is.
The link below is where you can read up on everything and get a little nostalgia from the early internet days.
The list of suffix and prefix are located here
The number of affixes on an item is completely random. Like you said, magic items can have 0-1 prefix and 0-1 suffix on them. Rare items can have 1-3 prefix and 1-3 suffix. The only other rare item that does NOT pertain to this rule are rare jewels, which are limited to 4 total affixes (2 and 2 respectively) as of patch 1.09. You'll probably be on 1.14d if you've updated at all in the last decade, but I thought I'd mention this anyway.