query: SELECT ?timespan ?count
  WHERE 
  {
          {{		SELECT (count(?item) as ?count) WHERE {
            		?item wdt:P31 wd:Q5 .
                  ?item wdt:P21 wd:Q6581072 .
    				?item wdt:P569 ?time0 .
    				FILTER ( ?time0 >= "0001-01-01T00:00:00Z"^^xsd:dateTime && ?time0 <= "1000-01-01T00:00:00Z"^^xsd:dateTime ) 
                  }
          }
  		BIND("0001-1000" as ?timespan)}
  UNION
          {{		SELECT (count(?item) as ?count) WHERE {
            		?item wdt:P31 wd:Q5 .
                  ?item wdt:P21 wd:Q6581072 .
    				?item wdt:P569 ?time0 .
    				FILTER ( ?time0 >= "1001-01-01T00:00:00Z"^^xsd:dateTime && ?time0 <= "1500-01-01T00:00:00Z"^^xsd:dateTime )
                  }
          }
          BIND("1001-1500" as ?timespan)}
  }