Maths comes from biological fairness
I have gut feeling that Maths is an extention of our biological propensity for fairness.
Maths has fairness principles….such as the equality sign.Taking from one side means adding to another ( no exception ) .Dividing one side ..you have to equally divide the other…etc
Counting comes from dividing gains.
Pythagoras theorem comes from the early origin of geometry…trying to give farmers back their fair share of the land after the Nile floods have removed traces of boundaries.
Thats why Mathematics fails at certain levels….because it derives from human notions of fairness and works well in the Newtonian landscape but begins to crumble at the Quantum level ( I think ).
Religion re-codifies fairness after our innate biological sense of fairness takes a hammering from the close proximity of a high density -socially stressed hierarchy.Maths is the fairness language of the hierarchy….causing the fair distribution of resources throughout the limbs and layers of a complex heirarchy. Could I say that it is the Religion of the Hierarchy ……hmmm.