The external world and the human mind operate by the same physical laws. The functions of the brain like perceiving, reasoning and calculating are done as physical processes. Experiences inherit the mathematical describability of physics: to the extent that natural laws are formulated mathematically, the experiences shaped by the laws are the same. Experiences cannot differ without an underlying physical difference. The explanatory framework that applies to the rest of nature applies equally to the events inside a head.
Mathematical concepts are features of physical structure that have been isolated from surrounding details. This is clear for elementary mathematics and for logic, which can be understood as generalizations over physical regularities. These generalizations are reached by ignoring low-level features and keeping only the structural relations that recur across many systems.
Counting, ordering, equality, conjunction, and the rest do not require Platonic abstractions to be intelligible. They are patterns that physical systems instantiate, and that humans, as physical systems themselves, can detect and manipulate. Physical devices such as computers, abaci, and brains, can manipulate mathematical concepts at all by arranging matter so that its dynamics mirror the relevant pattern of relations. The result is a substructure within physics that is causally relevant at the scale of human experience.
As elementary mathematics is extracted from structural features of physical law, its fit to that law is a consequence of how the abstraction is constructed. Advanced mathematics such as group theory in particle physics and Riemannian geometry in general relativity were developed in greater generality than physics required. Physics, when it was formulated precisely, found among them the substructures that fit. In either case, the underlying mechanism is structural correspondence sustained by the selection and refinement of those structures that prove apt and the abandonment of those that do not.
Once abstraction is understood this way, the relationship between physics and higher-level structure becomes familiar. A physical computer can be arranged so that its low-level dynamics simulate Conway’s Game of Life, a two-dimensional cellular automaton whose rules are vastly simpler than those of the underlying transistors. Conversely, a Game of Life configuration can be made to simulate logic gates, a Turing machine, or even another instance of the Game of Life. Both directions of the relation reflect the substrate-independence of computation: the Game of Life is Turing-complete, and so is the general-purpose computer that runs it. Either can implement any computable function.
The abstraction at each level is causally efficacious at that level: gliders collide, signals propagate and computations terminate, regardless of what physical substrate ultimately implements them. This is what philosophers of mind call multiple realizability: the same higher-level structure can be realized by many distinct lower-level physical setups.
The same logic applies to experience. Experiential setups like counted objects are targets for mathematical analysis. This is no different in kind from arranging a computer to run the Game of Life. In both cases we are selecting a substructure of the physical world that supports a particular high-level description. The description is no less real for having been selected.