Which ECU?

It does matter how many pins. As yellowdartdave said, the 4 pin SUPERCEDED the 5 pin. That means the 4 replaces the 5. It does NOT mean "the other way around."

If you have the older 4 pin ballast resistor, you can use EITHER a 4 or 5 pin ECU

If you have the newer 2 pin ballast, you MUST use ONLY a 4 pin ECU

You can NOT tell a 4 from a 5 by looking, on some brands. Some 4 pin ECUs have the 5th pin in place. If you don't know, you must "ohm" the 5th pin with a meter to see if it's hooked to anything or just a dummy