assume i need to describe something with an equations, for example the number of red apples on a tree

I could have RedApples=N

where N is the number of red apples.

or I could have RedApples=N*M^2/M*M

where M is the number of leaves on the tree and N is the number of red apples, in other words second equation contains unecessary information. Equation one is superior for the purpose as it contains less (in this case zero) unecessary junk information related to the problem.

What is an equation with minimum junk information called. Dose it has a special name in the field of mathematics? just optimal equation, Occam's razor come to mind, information theory, but yes any standardized term used to describe equation that only contains what it needs to contain to describe the problem with minimum "memory"

Mathematical formulas are a form of data compression - they represent information contained in the data while ignoring the rubbish or the pattern/dependence which is insufficiently represented in the data to be sufficiently sure that it really exists. It conceptually falls into the Minimum Description Length paradigm, which is commonly considered a formal version of Occam's razor. (To me this is all just a good old Bayesian inference.)

Of course there's much more to that, and one needs to be careful when jumping between the branches of the philosophical tree of sciences. But I need to defrost my fingers.