how many lyricists took part in writing beauty and the beast?
Value
3
class entity
music.lyricist m.09xfy6
music.lyricist film.film_song
Lyricist Beauty and the Beast
count none
music.composition.lyricist
Lyricist
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX : <http://rdf.freebase.com/ns/> 
SELECT (COUNT(?x0) AS ?value) WHERE {
SELECT DISTINCT ?x0  WHERE { 
?x0 :type.object.type :music.lyricist . 
VALUES ?x1 { :m.09xfy6 } 
?x1 :music.composition.lyricist ?x0 . 
FILTER ( ?x0 != ?x1  )
}
}
(COUNT (AND music.lyricist (JOIN (R music.composition.lyricist) m.09xfy6)))