     (set-last-namespace-shown! namespace-symbol)))
 
 (defn starting-fact-stream []
+  (reset! fact-counter 0)
   (set-last-namespace-shown! nil))
 
 (defn starting-to-check-fact [fact]

  (let [[_ _ & more] (lines/summarize failure-map)]
    (map #(str "# " %) (conj more (apply str (:position failure-map))))))

(defn fail [failure-map]
  (do
    (swap! fact-counter inc)

(ns ^{:doc "TAP output. See http://testanything.org"}
  midje.emission.plugins.tap
  (:use midje.emission.util)
  (:require [midje.data.fact :as fact]
            [midje.emission.state :as state]
