title: SPARQL query with COUNT and ORDER returns odd result
body: <p>The following query counts all triples in a store </p>
  
  <pre><code>SELECT count(*) where { ?s ?p &lt;http://dbpedia.org/resource/Cat&gt; }
  </code></pre>
  
  <p>And returns the expected results</p>
  
  <p><a href="http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org&amp;query=select%20count%28%2a%29%20%7B%20?s%20?p%20%3Chttp://dbpedia.org/resource/Cat%3E%20%7D%20&amp;debug=on&amp;timeout=&amp;format=text/html&amp;save=display&amp;fname=" rel="noreferrer">http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org&amp;query=select+count(*)+{+%3Fs+%3Fp+%3Chttp://dbpedia.org/resource/Cat%3E+}+&amp;debug=on&amp;timeout=&amp;format=text/html&amp;save=display&amp;fname=</a></p>
  
  <p>However, when I first tried it I accidentally left in an ORDER BY statement, e.g.,</p>
  
  <pre><code>select count(*) { ?s ?p &lt;http://dbpedia.org/resource/Cat&gt; } order by ?s
  </code></pre>
  
  <p>Then I get a very long list of results</p>
  
  <p><a href="http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org&amp;query=select%20count%28%2a%29%20%7B%20?s%20?p%20%3Chttp://dbpedia.org/resource/Cat%3E%20%7D%20order%20by%20?s&amp;debug=on&amp;timeout=&amp;format=text/html&amp;save=display&amp;fname=" rel="noreferrer">http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org&amp;query=select+count(*)+{+%3Fs+%3Fp+%3Chttp://dbpedia.org/resource/Cat%3E+}+order+by+%3Fs&amp;debug=on&amp;timeout=&amp;format=text/html&amp;save=display&amp;fname=</a></p>
  
  <p>Can anyone explain why this result happens and what it means? Is it maybe a bug with the Virtuoso SPARQL implementation?</p>