Switching flexibly between behavioral goals is a hallmark of executive control and requires integration of external and internal information. We recorded single-neuron correlates of different numerical representations (sensory-, working memory-, and rule-related activity) in the dorsal premotor area (PMd), the cingulate motor areas (CMA), and the ventral intraparietal sulcus (VIP) and compared them to previous recordings in the lateral prefrontal cortex (PFC). Two monkeys were trained to encode and memorize numerosities and flexibly switch between two abstract quantitative rules based on rule cues. Almost 20% of randomly selected PFC and PMd neurons significantly represented the numerical rule in a behaviorally relevant manner, approximately twice as many as in the CMA and VIP. Rule selectivity was significantly better for PMd neurons than for PFC cells. Seemingly at the expense of rule selectivity, however, sensory- and memory-related numerosity activity was greatly diminished compared with previous delayed match-to-numerosity studies. These findings suggest the involvement of the frontal premotor areas in strategic planning such as rule following. Moreover, the results emphasize that the coding capacities of neurons in association cortical areas are far more dynamic depending on task demands than previously thought.