Focusrite are quite obvious in their naming.
2i2 = 2in2out
4i4 = 4in4out
Although the type of inputs and outputs do vary depending on the model, and the more advanced models add additional features.
4i4 still only has 2 combined instrument/line/mic inputs the same as the 2i2, but adds 2 line outputs, along with 2 additional line outs. But it also adds loopback functionality (allows you to record any sound coming from your computer - I.e. if you’re playing along to something like a YouTube video, loopback allows you to record that sound in your DAW of choice), along with Midi in/out.