My second point is all about discretization. The ability to count the number of rocks comes after the ability to say "this is a rock", and I argue that the reality does not come equipped with a "natural" criterion to form a distinguished set of atoms and proclaim it to be a rock. A discretization procedure must be supplied that will do this. The output of such a procedure is a mental construct that we perceive as a rock and call a rock; it is such constructs that we count.
I like your use of an algorithm to sharpen the question, but since it's discretization that's fundamental to my point, not the counting of objects, let's consider an object recognition algorithm. These exist; supplied with an image of the beach with a rock on it, such an algorithm may be able to circle the rock accurately. We can imagine a really exact snapshot of information about all the atoms and their bonds at the beach (subject to the quantum mechanical constraints that aren't the issue here and will be ignored), and a much more powerful algorithm of essentially the same kind that will process such a snapshot and delineate the rock for us.
I claim that such an algorithm comes with hardcoded constants that are specific to the human-style discretization procedure, and have no "natural" importance in reality. A scale parameter you mention is one such constant, but to my mind there are many more. For example, one way in which such an algorithm might determine the boundary of an object is by considering differences in matter density (air is much less dense than rock); but even though it may compute and compare the densities, there's no natural way for it to decide which difference is significant and which is not. The choice of threshold will be appropriate to what our crude human senses are able to perceive, and what counts as significant in human experience. Or consider the inherently fuzzy boundary of the rock, at which the atomic behavior is very different from the interior of the rock (atoms leave in some quantities, air molecules seep in, perhaps there's an oxide layer, perhaps some vapor's forming...). When we perceive the rock as an object, we just don't care about that; and the algorithm will have to decide in some manner: "this layer of atoms with very different behavior is small enough to be considered the boundary layer of the object rather than, say, analyzed as a completely different and separate object". Well, the "small enough" is another threshold set at human values.
I disagree with you that "there are ways for an algorithm to decide on" appropriate values of all such constants/thresholds/parameters that does not utilize any human-specific values. I can see how this just might barely be possible with only the scale parameter, through the use of some ostensibly-objective constraints. E.g. a nano-creature faced with the rock will just "see" billions upon untold billions of separate "objects", but, you might argue, if we require the algorithm to end up with a small number of recognized objects (i.e. just the one rock), it will be able to dial the scale parameter to roughly the human scale w/o hardcoding any human-specific numbers. But even that is something like a cop-out, because it's not clear why we should expect to find a small number of objects rather than 10^10 of them; and in any case, I believe that if you properly account for the many separate parameters you need to tweak (or constants you need to set), this trick won't work anyway.
I think a stronger point for your argument could be made by directly contrasting bringing things together and separating the world into things . Spatial separation is probably the first thing humans learn to do in order to count (and our vision apparently does this automatically for small numbers of things), and that can be followed by learning more abstract ways of discretizing. Spatially putting things next to each other to count them is valid so long as the separation remains to keep them distinct. Mentally moving our viewpoint is equivalent to movin...
When mathematical truths and their applicability to the physical world are discussed, there's a certain kind of flawed (in my opinion) thinking that is often employed, and it comes out in sentences like "rocks behave isomorphically to integers, while clouds don't", or "two apples plus two apples is four apples, unless someone stole one from the bowl", and so on. I'll try to explain why I consider such reasoning flawed, and what are the more suitable descriptions of what's going on with the apples and the rocks and the clouds and the drops of water and such.
Two mistakes combine together and create a shared state of confusion; the mistakes themselves are almost independent and I think they stand or fall separately.
1. The first mistake is conflating counting things and bringing things together spatially. One usually goes with the other because that's how we learn to count, by looking at groups of things located closely together - but it doesn't have to be this way. When we say "take 2 apples and add 2 more apples, now count - you have 4 apples", we automatically imagine the two additional apples being brought in and placed next to the two original ones, but that's just a mental crutch you can easily do without. Let me show you: suppose I ask you to consider two sheep in England and two more sheep in Australia - how many sheep are there together? You see the English sheep in your mind's eye, there they are standing, and you count one, two. Now please resist the temptation to teleport the two Australian sheep and place them next in sequence. Instead, just fly with your mind's eye all the way to Australia in a split second and home on that field - there they are - and continue counting: three, four. There, you just counted 2+2 sheep without bringing them together in space, in real life or your imagination. There's nothing to it and you do it all the time - if someone asks you to count the number of chairs in a large and busy-looking living room, you don't bring them together in your mind, you just gaze-travel over the room and count them off one by one.
Now consider the implication of that to clouds or other such objects. Suppose someone tells you "well, apples obey the law of arithmetics, but one drop of water plus another drop of water equals one larger drop of water, not two" - it should be clear that they are naively conflating spatial movement and adding/counting. Adding two apples and two apples is not a spatial operation of bringing them together, it's a mental act of viewing them as one whole collection that can be counted. It's just that bringing them spatially together, in reality or your imagimation, is the easiest way to carry that "viewing" out. For drops of water or clouds, the spatial operation becomes a distraction, so just resist it. One cloud plus one cloud most certainly equals two clouds: just count them in your mind, here's one and there's two, maybe drifting next to each other, or maybe they're on separate continents. You don't have to merge them - nothing about "+" says you do.
2. The second mistake is a sort of a map-territory confusion where we naively grant the territory the power of holding discrete objects for our needs. It may be helpful to realize and to remember that at least on our macro scale of reality, on the scale of things we perceive with our senses, discrete, separate objects are a feature of the map, not the territory; they exist in your mind, not the reality. In the reality, there's just a lot of atoms everywhere (I'm simplifying; to be more thorough, think of elementary particles and many-worlds if you feel like it, and the virtual vacuum particles and so on) with no "natural" way of separating them into different conglomerates.
Normally, this really isn't an important point to insist on, and there's no harm whatsoever in just thinking of reality as being made up of objects like apples and clouds and whatnot. But imagine now an argument over an issue like "Was 2+2=4 before humans were around to invent that equation? I believe that long before humans, on an Earth devoid of life, when two rocks rolled onto a beach with three rocks already on it, there were five rocks altogether on the beach". What's really happening in that story? Well, there's the spatial confusion dealt with above, when we find it easiest to imagine the two rocks to be added rolling into the scene. But even before that, zoom in on those three rocks on the beach. What are they? What business do you have saying there's a "rock" there? There's a bunch of atoms of various kinds, and lots of other atoms (of air, sand, etc.) around and next to those, with somewhat different densities and behavior, but no definite boundary between any of them. On the nanoscale, there's constant exchange of atoms everywhere. To say "this is a discrete object, a rock" you need to be able to somehow ignore this inherently fuzzy boundary, maybe by picking a scale and smoothing out all the fine details below it - in human experience, the crudeness of our senses does that job for us, but our senses aren't there in that picture. The reality doesn't know or care about "rocks" - there's just atoms.
This isn't to say, I find it important to note, that the existence of three rocks on that beach is somehow a "subjective" claim. Imagine that there are alien nanobots everywhere on that Earth, recording everything faithfully on the nanoscale and storing the data somewhere for someone to discover; a billion years later, you come along, parse the data, reconstruct the scene - and of course you'll then recognize that there were three rocks on the beach. The fact that there are three rocks on that beach is an objective fact of nature; it's just that the meaning of that statement relies on the procedure of discretization being carried out, on someone or something defining what we consider a single discrete object and how we isolate it; and nature won't do that for you. You do that with your brain. That's why counting - and addition - are inherently mental acts carried out on mental constructs; on the map, not the territory.
All this is not to say that math is "invented" rather than "discovered"; I think my analysis is silent on that, and both platonism and formalism remain possible. It's just that an example of five rocks on the beach before humans are around is not helpful in resolving that question - without human-style discretization you can't meaningfully say it was five rocks there, rather than just a bunch of atoms. It may still be true - I certainly believe so - that the laws that govern the behavior of discrete objects, though they are normally mental entities, are universal and 2+2 was 4 before humans were around and in any alien mentality.
(It remains to acknowledge that reality may be discrete on the micro level - spacetime itself may be discrete, we can certainly speak of single photons, etc. This is irrelevant on the level of our everyday perceptions, however - the level of apples, rocks, clouds and so on).