let rec nb_sub_hom1_b e s =
let n = ref 0 in
let rec loop s =
match s with
[] -> ()
| [e1] -> if (e = e1) then incr n
| e1::e2::s' ->
if (e2 = e) or (e1 = e2) then
(loop (e2::s'))
else (
incr n;
(loop (e2::s'))
)
in
loop s;
!n