select * where { graph ?g { {select (count(*) as ?c) where {?s ?p ?o}} } }