Encoding the serial order of events is an essential function of working memory, but one whose neural basis is not yet well understood. In the present work, we advance a new model of how serial order is represented in working memory. Our approach is predicated on three key findings from neurophysiological research: (1) prefrontal neurons that code conjunctively for item and order, (2) parietal neurons that represent count information through a graded and compressive code, and (3) multiplicative gain modulation as a mechanism for information integration. We used an artificial neural network, integrating across these three findings, to simulate human immediate serial recall performance. The model reproduced a core set of benchmark empirical findings, including primacy and recency effects, transposition gradients, effects of interitem similarity, and developmental effects. The model moves beyond previous accounts by bridging between neuroscientific findings and detailed behavioral data, and gives rise to several testable predictions.