Revised answer, in light of the comments by @Jonathan Garber:
Let's talk about two different senses of the word "fireworks":
If you're talking about a rocket or a firecracker, the singular of "fireworks" is still around, and it is indeed countable. At least some native speakers would say you can "buy a firework".
If you're talking about fireworks meaning "a pyrotechnic display", you always use the plural form "fireworks".
Let's talk about the second case. "Fireworks" used to be the plural of "firework", and at one time people used the phrase "a firework" in this sense.
These days, however, phrases like *"a firework" and ??"three fireworks" sound strange when referring to fireworks displays. The singular form is more-or-less lost in modern English, so we say could say the word is defective (lacks a form). That doesn't explain why ??"three fireworks" sounds odd; let's say that it's become a collective noun to explain that one.
So can you count "fireworks"? It depends on how you're using the word.
As for your sentence, it's fine, except for one thing: it should say "dangerous" rather than "danger". "Dangerous" is an adjective and can modify "fireworks" in this position; "danger" is a noun and cannot. (This has nothing to do with whether you can count fireworks.)
*Ungrammatical
??Relatively unacceptable
Your base sentence is itself ambiguous.
It may mean that each of the tasks with which you are concerned outputs a single new task.
It may mean that each of the tasks with which you are concerned outputs multiple new tasks.
It may mean that the tasks with which you are concerned participate in an aggregation or collaboration which outputs multiple new tasks.
It may mean that the tasks with which you are concerned participate in multiple aggregations which each output one or more tasks.
Context will ordinarily sort out which of these is intended, so in practice most people will find all three sentences you put forward acceptable (provided you replace the singular verb outputs in the third one with output).
But if you are concerned to avoid the consequences of the Adamantine Law† you will compose a different sentence for each. Given your preference for expressions with whose rather than which, I suggest:
Generally speaking, this concerns tasks each of whose output is another task.
Generally speaking, this concerns tasks each of whose outputs are more tasks.
Generally speaking, this concerns a set of tasks whose aggregate output is more tasks.
Generally speaking, this concerns tasks participating in aggregations each of whose output is one or more tasks.
Myself, I prefer to replace the expression each of whose with whose each. However, a discussion of whose each on our Elder Sister Site suggests that this expression is unfamiliar to many contemporary readers; so it should probably be avoided under the Insularity Principle‡.
† The Adamantine Law: “Any expression that can be misunderstood will be.”
‡ The Insularity Principle: “Any expression, however well established, will be rejected as ‘ungrammatical’ by those unfamiliar with it.”
Best Answer
They are both correct, given proper context.
If you want to ask someone how many whole onions, they want, you use the former:
Note that the answer can be fractional:
This is the more common usage.
However, if you want a volume of onion, either chopped or prepared in some way, you would use "much".