Yes, completely avoiding a loss is never possible while one is trading. Still I have seen many traders aiming for it, rather they should try to analyse their losses and try not to repeat the same error in future. This ways they can minimise their losses, if not completely bring them to zero.
I tend to suppose that the amount of losses doesn't matter at all. The matter here what lessons did you take from these losses. The main here is to understand that every loss is a lesson, and you should check all your mistaken in order not to face losses because of the same mistake again in future. It's pretty difficult I know, however in this case you will develop your skills in trading twice faster. Some traders give up the idea to continue trading after loss strick, but I don't think it's a right behavior. The right behavior is to have an ability to take these losses and move further.
It's almost impossible to determine how many losses you should have before you get enough experience and will trade without losses. Basically, as far as i concerned, even professional traders have losses, however of course they rarely have them, but even them aren't protected from losses and mistakes. Trading is all about constant learning and practicing. The market changes daily and that's why sometimes traders aren't ready for sharp changes on the market. I believe that you will have losses until you will be experienced enough. It's pretty important in trading to have losses, even in case they disappoint you a lot.