Ok, let's take this one further and remain with your above rocks exercise, and not get
TOO accurate
Let's say the front of the rock is 3 m from the camera and the rear shrubs are 6 m from the camera. That gives you a total depth of 3 m that you want to be all in sharp focus in your finished image.
At 3m using your 90 mm at f/14 there is a DoF of 0.62 m.
You require an overlap of in-focus depth (0.62m) of 20% which means you need steps of 0.49 m.
The total depth you require is 3 m so the number of steps is 3 divided by 0.49 = 6.1. We would round up to 7.
So you now know that 7 steps or a greater number of them is going to give you what you need to get all of the frames overlapping in focus area.
Now the problem comes as to how you physically achieve this, rotating and counting 'serrations'/markings or using a gizmo as John describes (which is simply a physical 'extension' to the serrations method). If I were you I would try this scene again, setting your focus firstly on the bit of rock closest to you and moving the barrel one serration at a time. If your lens does not have these serrations I will happily draw you up a band that you can tape around it with graduated markings that you can print on paper and cut out.
No geared head is required or a focus rail. Besides it would be one heck of a large focus rail for the above scene
If you have that gear but you don't need it yet. You may recall that crab exoskeleton I posted a few months back, done by rotating the barrel by 1/2 serration increments.
Edit : I believe there will be no need to do any maths as you will eventually learn from experience you simply move by increments of 1/2. 1 or 2 serrations at a specific aperture whether it is for near or far subjects. The maths may come when when you get into micro stacking and are also used by the remote controllers.
I missed this one but Manfred caught it.
I think we are getting there, and there is no need for too much complication.
Look at it practically, if you do a test tomorrow on the same scene, use 2 x serration intervals and after stacking find it was not enough, you go back and do it with 1 x serration intervals
And if you do too much maths it's going to tell you to rotate the barrel something like 2.367 deg after the first shot, then 2.389 after the second up to 7.636 before the last shot and you are going to say