All pathways ordered by categories which contain the introduced term

Statement: 
Display all pathways ordered by categories which contain the introduced term $title$ (e.g., aspartate, p53 etc.).
Limit of results per page $number$ (e.g. 10)
Query: 
prefix wp: <http://vocabularies.wikipathways.org/wp#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dcterms: <http://purl.org/dc/terms/> SELECT DISTINCT ?category (count(?category) as ?noCategories) WHERE { ?pathway wp:category ?category . ?pathway dc:title ?title . FILTER REGEX(?title, "??title", "i") } GROUP BY ?category ORDER BY ?category