Counter target spell. Its controller mills three cards.
A spell that can’t be countered is a legal target for Thought Collapse. The spell won’t be countered when Thought Collapse resolves, but its controller will still put the top three cards of their library into their graveyard.