Hint Extern 4 (_ el map _ _) => eapply in_map_iff.
Hint Extern 4 (_ el filter _ _) => eapply filter_In.
Fixpoint count (l : list nat) (n : nat)  :=
match l with
| [] => 0
| m :: l => if Nat.eqb n m then S (count l n) else count l n
end.

Lemma countSplit (A B: list nat) (x: nat)  : count A x + count B x = count (A ++ B) x.