Thomas Aquinas's theory of individuation is often misunderstood. Aquinas does hold that the principle of individuation for material things is matter, but (contrary to what seems to be a common belief) this is not his whole account of individuation. The following passages from the De Unitate (Chapter V) clarify things a bit.
Nor is it true to say that every number is caused by matter, for then Aristotle would have inquired in vain after the number of separated substances. For Aristotle says in Book Five of the Metaphysics that `many' is said not only numerically but specifically and generically. Nor is it true that separate substance is not singular and individuated, otherwise it would have no operation, since acts belong only to singulars, as the Philosopher says; hence he argues against Plato in Book Seven of the Metaphysics that if the Idea is separate, it will not be predicated of many, nor will it be definable any more than other individuals which are unique in their species, like the sun and moon. Matter is the principle of individuation in material things insofar as matter is not shareable by many, since it is the first subject not existing in another. Hence Aristotle says that if the Idea were separate "it would be something, that is, an individual, which it would be impossible to predicate of many."
Separate substances, therefore, are individual and singular, but they are individuated not by matter but by this: that it is not their nature to exist in another and consequently to be participated in by many. From which it follows that if any form is of a nature to be participated in by something, such that it be the act of some matter, it can be individuated and multiplied by comparison with matter. It has already been shown above that the intellect is a power of the soul which is the act of the body. Therefore in many bodies there are many souls and in many souls there are many intellectual powers, that is, intellects. Nor does it follow from this that the intellect is a material power, as has been shown.