Calculate distance between front and back faces?

So I have put together a shader for some magic glowing crystals. I wanted some specific things from it. I wanted it to have transmission and translucency, it had to be transparent with distortions on what's behind it, and finally I wanted it to be more transparent at the edges as well as a lighter color and allowing more light to pass through depending on the depth of the model.
I've gotten everything here working EXCEPT the depth-based transparency. In the meantime I slapped a fresnel effect onto it for almost the effect I wanted but I wanted true depth. So, is there a way to calculate the distance between the back face and the next front face behind it in Amplify?

I've gotten everything here working EXCEPT the depth-based transparency. In the meantime I slapped a fresnel effect onto it for almost the effect I wanted but I wanted true depth. So, is there a way to calculate the distance between the back face and the next front face behind it in Amplify?
