An acquaintance told me that buying masks in Berlin is relatively expensive ~ 5€ for one mask. To that end, I'm thinking of buying masks for myself for the next year from Indonesia (where I currently am). I want to buy around 5 boxes of 50 masks and I'm wondering if there is a limit of the number of a single item I can take with me on a plane. I'm travelling on Qatar Airways and I couldn't find anything on their website.
The airline won't care and won't know, as long as you pack it all in a bag that meets its luggage requirements (weight/dimensions). That's also why they won't even publish guidelines and let you make your own determination as to what you are allowed to import in and out of the countries you are flying into.
Security screeners mostly do not care, outside of liquids, batteries, etc. I guess it could invite additional scrutiny in some case but I wouldn't expect it to be a big problem.
Customs might take an interest. There is a €430 allowance to import goods without paying tax (especially VAT) or duty but it only applies to things that are intended for personal use (including gifts and use by members of your household). If the quantity seems excessive, it might be interpreted as proof that you are lying and actually plan on reselling the masks. I cannot provide a hard number but that's where the real limit lies.
If you count two masks a day (public transportation and 8-hour work day with the recommended 4h per disposable mask), 5 boxes of 50 don't even cover half a year so you can make a good case that those are for personal use. On the other hand, a relative once got fined for crossing a border with a dozen bibs so it doesn't necessarily take that much to get into a bit of trouble (it was in Switzerland though, not in the EU, and many years ago).