Franklin writes: << It's still 18. Note first that each 7x7x1 plane can contain at most one entire brick, so in order to fit more than 18 bricks, one of the directions must have one entire brick in each plane; call these the base set. Looking at each of the other dimensions, there are 28 1x4 cross-sections of the base set distributed amongst the 7 planes. Since no plane can have more than 7 of these (one from each brick in the base set), there must be at least two planes with at least 4 such cross-sections (5*3+6+7=28). A little fiddling will show that it is impossible to fit a brick and 4 parallel cross-sections into a single plane (they have to be parallel because they come from bricks aligned in the same dimension). So each of the other dimensions can have at most 5 bricks, for 17 total, contrary to our assumption.
That's pretty subtle reasoning --nice! Do you also know the story for how many NxNx1's can fit in a (2N-1)-cube, as you suggested? (Or torus?) Is the question of how many registered KxLxM's can fit in a PxQxR cube (or torus) solved in general? --Dan