Solution:
The answer is 26880. It is immediate to notice that the sum of opposite faces must necessarily be 15. Let us then partition the numbers from 1 to 14 into the pairs {1,14},{2,13},…,{7,8}, so that the sum in each pair is 15: each pair of numbers must be assigned to a pair of opposite faces.
Let us put a die on the table, resting on an octagonal face, so that in front of us there is another octagonal face. Let us call a configuration a way of writing the numbers on this die so that the sum of opposite faces is 15; we say that two configurations are equal if we have written the same number on every face. There are a total of 27⋅7! configurations: indeed, we must assign to each pair of opposite faces a different pair of numbers whose sum is 15, which can be done in 7! ways. Next, we have two ways of writing each pair of numbers on the associated pair of opposite faces (we can write the smaller number on a certain face and the larger one on the other, or vice versa).
Let n be the number of dice possessed by Lucio. Taking one of Lucio's dice, we have 24 different ways of resting it on the table on an octagonal face so that in front of us there is an octagonal face: indeed, we must choose in 6 ways on which face to rest it, and in 4 ways which of the 4 adjacent octagonal faces to turn toward us. Each way of resting it thus gives us 24 different configurations; moreover, the configurations obtained from two different dice of Lucio's are always different, because otherwise we would find a rotation that carries the first die into the second.
This tells us that n≤2427⋅7!=26880. Suppose that n is the maximum possible: if, for the sake of contradiction, n<26880, then there would exist at least one configuration that cannot be obtained from any of Lucio's dice. If we were to add to the box the die with that configuration, the conditions would still be satisfied, and hence n was not the maximum possible, a contradiction. Therefore the answer is n=26880.