I'm trying to simultaneously download multiple files. How am I to determine an optimal number of files to download in parallel?
Impossible to answer - that depends on many factory that are outside of your control, mostly latency, packet loss.
The optimal number will use up all bandwidth with as few connections as possible. This may vary, over time, over download location (same server, not) and may have limits imposed from the other side.
Make it configurable, start with something like 2-4 connections to start.