Though it is often assumed, the Bible does not state that God required all the animals in existence be taken on the Ark. Creatures that either already lived in water, or could easily survive in it, did not need to be transported on the ship.
For example, animals such as fishes, dolphins, whales and so on could easily live in the flood waters without needing any assistance. Other creatures such as starfishes, sea urchins, mussels, clams, corals, jellyfishes, sponges and others would also not need the services of the Ark. Additionally, most types of snakes, alligators and so on would be able to live in water. Many insects, worms, and other creeping animals could survive as well in liquid and therefore not need to be carried on the Ark.
Three divine requirements
God gave Noah three requirements that animals allowed on the Ark had to meet. They had to be air breathing, terrestrial (land-based) and had to be capable of interbreeding (see Genesis 6:17, 19 - 20, 7:22).
Furthermore, of all those that qualified for inclusion on the Ark, seven of every beast that was considered "clean" but only two of every animal considered "unclean" was to be taken (Genesis 7:2 - 3). This meant, for example, that while seven sheep initially entered the great ship only two pigs got on it.

Clean and Unclean
The Biblical criteria for identifying whether an animal was clean (i.e. fit for human consumption) or unclean (i.e. detrimental to man's health if consumed) is found in Leviticus 11 and Deuteronomy 14. Warm-blooded beasts that have both split hooves and chews a cud is clean (Leviticus 11:3, Deuteronomy 14:6). Animals in this category include cattle, deer, goats and many others (see our complete list of clean foods). Those that do not have a split hoof and do not chew a cud are designated unclean.
Additionally, animals were considered unclean if it had a split hoof but did not chew cud or vice versa. For example, although swine (pigs) have split hooves they do not chew the cud and are therefore unclean (Leviticus 11:7, Deuteronomy 14:8). Camels, who do chew the cud but who do not have split hooves are also unacceptable (Leviticus 11:4, Deuteronomy 14:7).
Why seven?
Why did God require seven of the clean but only two of the unclean animals? It is because those considered clean could be used for food and therefore it was important to have extra breeding stock. They could also potentially be offered in sacrifice to God (as Noah did at the end of the flood, Genesis 8:20).
How many were saved?
So, given all of the above, how many animals did the Ark save from the flood? There are several different estimates for the number kept from the floodwaters. The book "The Genesis Flood" estimated that approximately 35,000 creatures were on board the ship. In another book, "Noah's Ark - A Feasibility Study" by John Woodmorappe, it states that only about 2,000 animals would need saving.
Could a ship like the Ark be built, more than 4,000 years ago, that could accomodate (for the sake of argument) a conservative number of 40,000 animals?
Many biologists state that the average size of most vertebrates is the size of a sheep. The living space each sheep needs is 11.12 cubic feet (.31 cubic meters). When we multiply 40,000 by 11.12 cubic feet we arrive at 445,000 cubic feet total (12,601 cubic meters). Given that the total volume of the ship God commanded to be built was conservatively 1.5 million cubic feet (42,475 cubic meters), the Ark would be less than 30% full with lots of room to spare for the animals!