A task that has been intensively studied at the neural level is f lutter discrimination. I argue that f lutter discrimination entails a combination of a temporal assignment problem and a quantity comparison problem, and propose a neural network model of how these problems are solved. The network combines unsupervised and one-layer supervised training. The unsupervised part clusters input features (stimulus + time window) and the supervised part categorizes the resulting clusters. After training, the model shows a good fit with both neural and behavioral properties. New predictions are outlined and links with other cognitive domains are pointed out.