Since 6 are birds and you know he has 2 parakeets, you know he has 4 canarys. He has 5 goldfish since he has one less canary then goldfish. He has 1 turtle since he has 4 more goldfish than turtles.
2 parakeets + 4 canarys + 5 goldfish + 1 turtle = 12 pets
It depends on how you count them. If you describe them by their dimensions, lowest one first, you can have
1 x 1 x 18
1 x 2 x 9
1 x 3 x 6
2 x 3 x 3
Of course, these dimensions can be put in any order.
9 hours because 8 x 3 = 24 and 3 x 3 = 9