   (let [napdmwl '("Cerberus \"Lady\" H1" "Clone Chip" "Desperado" "Parasite" "Prepaid VoicePAD" "Yog.0"
                    "Architect" "AstroScript Pilot Program" "Eli 1.0" "NAPD Contract" "SanSan City Grid")]
     (some #(= (:title card) %) napdmwl)))
+
+(defn card-count [cards]
+  (reduce #(+ %1 (:qty %2)) 0 cards))
 
 (defn noinfcost? [identity card]
   (or (= (:faction card) (:faction identity))

                        (update-in currmap [(keyword (faction-label card))]
                                   (fnil (fn [curinf] (+ curinf (* (:qty line) (:factioncost card))))
                                         0)))))
        infmap (reduce infhelper {} cards)]
    (if (= (:title identity) "The Professor: Keeper of Knowledge")
      (let [progs (filter #(= "Program" (:type (:card %))) cards)
            ;importedprogs (filter #((complement noinfcost?) identity (:card %)) progs)
            singledprogs (reduce #(conj %1 (assoc-in %2 [:qty] 1)) '() progs)
            singledinfmap (reduce infhelper {} singledprogs)]
      (merge-with - infmap singledinfmap))
      infmap)))

(defn mostwanted-count
  "Returns total number of MWL restricted cards in a deck."

  [deck]
  (let [identity (:identity deck)
        cards (:cards deck)
        ;; sums up influence of a cardlist by faction to a map
        infhelper (fn [currmap line]
                    (let [card (:card line)]
                      (if (= (:faction card) (:faction identity))
