Judging from the link you provide, you have three distinct vertices s,t,d and want to compute the number of shortest walks P(s,d,t) from s to d that contain t. The reason I use "walks" instead of "paths" is because of graphs like:
s----d----t
where we must reuse edges.
If you really mean acyclic graph, then P(s,d,t)=1 if there is a path containing vertices s,t and d and P(s,d,t)=0 otherwise.
Let P(s,t) be the number of shortest walks between s and t and P(s,s)=1. If s, d and t are all distinct then P(s,d,t)=P(s,t)P(d,t).
In Section 2.4 of the paper you link to, they describe the algorithm for finding P(s,t). That is $P(s,t)=\sum_{v \in V} P(s,v)$ where V is the set of neighbours of t for which P(s,v) is minimal. The difficulty is identifying which neighbours of t minimise P(s,v).
One way is to construct a set Sn of paths of length n=1,2,... (this can be done recursively), from t until you find some neighbour of s. Then count 1 for each path that ends in a neighbour of s and 0 otherwise. Another way would be to compute P(s,t) and then use a backtracking algorithm.
There's not going to be an exciting formula for P(s,d,t) in general, since it depends on the graphs' structure. This is much like how there's not going to be an exciting formula for the number of edges in a graph (unless you restrict to some specific class of graphs).