Were M3 and M5 founded by a person that M1 influenced and M2 married and founded by M4
SELECT count(*) WHERE {
?x0 a ns:people.person .
?x0 ns:influence.influence_node.influenced_by M1 .
?x0 ns:people.person.spouse_s/ns:people.marriage.spouse|ns:fictional_universe.fictional_character.married_to/ns:fictional_universe.marriage_of_fictional_characters.spouses M2 .
FILTER ( ?x0 != M2 ) .
M3 ns:organization.organization.founders ?x0 .
M3 ns:organization.organization.founders M4 .
M5 ns:organization.organization.founders ?x0 .
M5 ns:organization.organization.founders M4
}