Typically, inches for length because that's the unit of measure on most chains when you buy them, but it's all convertible - chain links have to be uniform in length for a given chain, and cogs and rings have to have the same distance between teeth, and both of them have to be relative to the length of a link. On the F/4, R/4 instead of F/2, R/2 basically, yes to your question. Think of it this way - the chainstay length is center of BB to center of rear axle. If you draw a vertical line through these two points, they'd cut the chain ring and cog in half, respectively - so to get the added distance needed for your chain as it wraps the ring & cog, you start with an arc length of 1/2 of each circle: in our case, expressed as F/2 and R/2. But now you need to think about how a chain ring or cog is constructed - half of it is peak (or "tooth") and half of it is valley (or "groove".) Since our unit of measure is "tooth", we divide our arc length in half to get it all back to the "tooth scale." Thus, F/4 and R/4. If the ring and cog size were expressed as actual measures of distance (like inches or cm or whatever) they'd need to account for more than the number of teeth - they'd need the valley portion of the ring or cog as well.
BTW way, no nerd war here: first, it's not my equation so I have no investment in it - it's just something I found online when I was building my first SS and cared about things like getting every measurement exact. But more importantly,
@Patrick is right about this not working perfectly for significantly large ratios. But as he also points out those ratios have to get pretty far out of line before they jump outside the tolerances of whatever your adjustment range is. Even if you used this for a 53:11 SS (in which case, you should build in some time to plan a fittingly lovely memorial for your knees), you're not going to be off by that much, perhaps even within the range of your chainstay adjustment. But it's definitely something to remember and a good enough reason to always check that your length will work BEFORE you cut the chain.