induction l...
simpl.
destruct (p a)...
intros.
rewrite IHl...
Qed.

(* Specifications: *)
Lemma count_0 l: (forall x, In x l -> p x = false) -> count l = 0.
Proof with auto. induction l... simpl. intros. rewrite H... Qed.
Lemma count_le l: count l <= length l.
Proof with auto with arith.