In the basic Genesis instruction, Noah took two animals of each kind onto the Ark.
Genesis 6:19–20 tells Noah to bring two of every kind of living creature into the ark, one male and one female, so that they could survive and reproduce afterward. This is the source of the familiar phrase “two by two,” although Genesis uses the idea within a longer set of instructions.
A related passage creates an important distinction. Genesis 7:2–3 tells Noah to take extra animals described as clean, while the wording is translated differently across versions, commonly as seven pairs or seven of each kind. Because of that later instruction, the simplest statement that every category had exactly two animals can be incomplete.
The canonical answer to the basic “each kind” instruction is two. The clean-animal exception is a neighboring detail, not a reason to replace the general number with seven or twelve.