**Always play your best players and change your formation according to what players you have rather then trying to fit your players into a specfic formation.**
First off, I want to say, I don't actually play any other formation apart from 4132 because I don't have the players to play them. But I have read enough to have a good guess how the match engine works so I'll put a few tips down on how to counter a formation.
Defence
How many to play in defence largely depend on how many attackers you are facing.
Generally, you would want your defenders to outnumber your attackers by one to counter his attack. So if they play one strikers upfront, play 2 dc, two strikers upfront 3 dc, 3 strikers upfront play with 2 dc with a dmc blue arrow.
Edit: Come to conclusion that 4 at the back is usually the best defence just like real life. The main reason is because 3 at the back is way too easy to exploit if the other manager knows what he is doing. Also, I have found 4 at the back tend to be able to handle three strikers using zonal marking and gives you a spare man to win somewhere else on the pitch.
Against 1 striker you can play 4 at the back or lopsided 3 at the back with one full back and 2 dc as you need a minimum of 3 defenders. The empty side, you can make up anywhere along the side to make it a legal formation. e.g. if you play DL, DC, DC then you will need to play one of DR/DMR/MR/AMR.
Attack
Similarly, in attack you generally do not want to be outnumber by their defenders. If they play 3W defence (DL, DC, DR), you should play 2 strikers to abuse his one dc. If they play the usual 4 at the back, then usually it is good to play 2 strikers rather than one against his 2 DC or you can play 3 strikers against this 2 DC. However, I tend not to like a three strikers formation because against teams better than yours, you probably need more at the back then at the front whilst you don't need 3 strikers to beat a team weaker than you anyway.
Against a 3DC formation, it is usually better to play 1 striker upfront supported by AML/AMR. The reason is that you have his 3 DC triple marking your one guy and give you enough players to elsewhere on the pitch where you can make a difference. In this case, on the wings to attack him.
Midfield
So given how many players you need in defence and attack is kinda easy to work out, the midfield is where you might need to tweak a lot of positions.
Again, it is preferable to outnumber their MC by at least one. If they play 1 MC, you should play 2. If they play 2 MC, you should play 3 MC or 2 MC plus 1 DMC and against 3 MC, you should at minimum have 3 also and maybe to be safer play a DMC to clean up if you have the spare man to do so.
Wingers
To have a legal formation, you need a least one play on each side. If you play four at the back, your DL and DR would mean you do not need to play any other wingers. Usually, that is what I do and where I get the extra men to win in other areas of the pitch. So against a 43N2W1v, I would play 4132 where I win my 2 DC against his 1 striker, win the centre midfield battle with 3MC plus DMC against his 3MC and go even with my strikers vs his 2 DC. For me to win those positions, I have to sacrifice my wings and his fullbacks have no one to mark but also provide a negligible offence since they are so far back.
If you play with 3N DCs, then you need to make up the wings with either DML/R or ML/R. I would suggest not playing 5 at the back as it is too defensive and can be countered with force counterattack order. If they play with full backs, then you can play AML/R for your only wingers since you do not need to defend.
So that is basically it on how to make counter formations. The only other things are to place your attacking players where he has no defenders e.g. if he plays DMC, don't play AMC. If he plays with DML/DMR and you have extra attackers to play, play AMC instead of AML/AMR etc.
If I give a few examples:
3W123W1 - counter is 4132. 2 dc against his 1 striker. Go even with his midfield but win his defence because you have 2 strikers to his one DC.
4213 - counter is 4132. In this instance because he plays three upfront, you can play 4 at the back with DMC blue arrow to mark his middle striker so that you are not out numbered in defence. It is far more preferable then tying to play 5 at the back to mark his 2W3 attack or 3 DC where your defence go even with his strikers. You then win the midfield battle because you have 3 MC vs his 2 MC. The only thing to be aware of is that red arrow is needed on your fullbacks as they have not much to mark on the wings and should not be wasted hanging back. Or even better is to not play one of the fullbacks and play a proper winger further up the pitch so you have a lobside formation.
3N2W3N2 - counter is 3N151 you beat his attack with one more player and you win the midfield battle with an extra DMC. What you lack tho is enough attackers. As said above, usually with 3N, you try to beat it with 1 striker and attack him down the wings with AML and AMR. But in this case, since he has also DML and DMR, it would be better to play ML/MR instead and beat it using force counter attack.
Final disclaimer: All of this is my guess of how things work like everybody else since no one knows how the match engine works. Therefore, nothing I have written is set it stone. DYOR. If you think something don't make sense or it doesn't seem to apply to our experience, please write below to discuss it! Ta.