Broadside, you're welcome. Thanks for the post.
As to your question, I do not know of any integer or way to determine other than visually. You can check and see the trade lanes going into your port. You can also count the number of shipping trade agreements you have.
The total number increases per the guide, technology building advances + the number of trade ports central to your home region. Additionally for land trade routes, any new neighbors will be eligible for trade.
So if you have two basic trade ports = 4 total trade agreements. You'll know when you run out. There is a tooltip for trade information in the diplomacy window.
Mouse over the trade icon in the diplomacy window. Will tell you more details about who can trade, when a trade route is blocked, or the entity has no ports, etc. Early on I saw a number here, but I haven't seen it since the first patch. Either I'm doing something different, or it's changed.
coman