We consider a class of statistics connected with the history of a Markov chain before the first occurrence of certain runs. Methods for deriving generating functions, distributions and moments of the statistics considered are given. In the case of i.i.d. random variables, explicit formulas are derived.