You can collect up to 5 tasks of the same type. If the tasks are less than 5, you can keep collecting until you have 5 in hand
Even if you have 4 completed tasks in hand, you can still collect 1 more only.
After you deliver all 5 tasks, you can collect again. In other words, collecting restriction resets every time you complete 5 tasks.