I am currently querying DBPedia for a list of person names by using the SPARQL package in R. And now I am working on counting of different categories for one person, such as the number of wikilink or external_link. But I only know to count all the items together per person, such as:
query= "SELECT COUNT (*){
<http://dbpedia.org/resource/Philipp_Melanchthon> ?p ?o
}"
This just print out the count of all the items for one person, is there any way to print out the count of different categories for one person respectively? Many thx.