from wdqs import Client
client = Client()
query = '''
SELECT ?discoverer ?name (COUNT(?asteroid) AS ?count)
 WHERE {
   ?asteroid wdt:P31 wd:Q3863 .
   ?asteroid wdt:P61 ?discoverer .
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
    ?discoverer rdfs:label ?name
   }
 }
 GROUP BY ?discoverer ?name
 ORDER BY DESC(?count)
 LIMIT 1000
'''
result = client.query(query)
from pandas import DataFrame
df = DataFrame(result)
df
count discoverer name
0 16455 http://www.wikidata.org/entity/Q735603 Lincoln Near-Earth Asteroid Research
1 3213 http://www.wikidata.org/entity/Q213563 Spacewatch
2 2287 http://www.wikidata.org/entity/Q312255 Tom Gehrels
3 2272 http://www.wikidata.org/entity/Q231642 Ingrid van Houten-Groeneveld
4 2271 http://www.wikidata.org/entity/Q336095 Cornelis Johannes van Houten
5 2129 http://www.wikidata.org/entity/Q312755 Eric Walter Elst
6 1755 http://www.wikidata.org/entity/Q1165635 Lowell Observatory Near-Earth-Object Search
7 1557 http://www.wikidata.org/entity/Q1140499 Near-Earth Asteroid Tracking
8 1237 http://www.wikidata.org/entity/Q814731 Beijing Schmidt CCD Asteroid Program
9 1101 http://www.wikidata.org/entity/Q446449 Schelte J. Bus
10 1074 http://www.wikidata.org/entity/Q457312 Takao Kobayashi
11 743 http://www.wikidata.org/entity/Q515838 Catalina Sky Survey
12 715 http://www.wikidata.org/entity/Q380828 Henri Debehogne
13 690 http://www.wikidata.org/entity/Q507053 Hiroshi Kaneda
14 690 http://www.wikidata.org/entity/Q737057 Seiji Ueda
15 678 http://www.wikidata.org/entity/Q543230 Henry E. Holt
16 610 http://www.wikidata.org/entity/Q58962 Eleanor F. Helin
17 574 http://www.wikidata.org/entity/Q561077 Kazuro Watanabe
18 561 http://www.wikidata.org/entity/Q358274 Edward L. G. Bowell
19 540 http://www.wikidata.org/entity/Q318611 Nikolai Chernykh
20 534 http://www.wikidata.org/entity/Q450347 Takeshi Urata
21 508 http://www.wikidata.org/entity/Q60764 Freimut Börngen
22 498 http://www.wikidata.org/entity/Q1785454 UESAC
23 485 http://www.wikidata.org/entity/Q541488 Kin Endate
24 463 http://www.wikidata.org/entity/Q1749185 Mount Lemmon Survey
25 450 http://www.wikidata.org/entity/Q710381 Robert H. McNaught
26 418 http://www.wikidata.org/entity/Q450340 Korado Korlević
27 395 http://www.wikidata.org/entity/Q77026 Karl Wilhelm Reinmuth
28 356 http://www.wikidata.org/entity/Q231618 Carolyn S. Shoemaker
29 324 http://www.wikidata.org/entity/Q1759008 OCA-DLR Asteroid Survey
... ... ... ...
696 1 http://www.wikidata.org/entity/Q3849547 Mark Scott Marley
697 1 http://www.wikidata.org/entity/Q3600370 A. David Andrews
698 1 http://www.wikidata.org/entity/Q3618988 Antoni Vidal
699 1 http://www.wikidata.org/entity/Q3604971 Adam Block
700 1 http://www.wikidata.org/entity/Q3508752 Kamil Hornoch
701 1 http://www.wikidata.org/entity/Q3856706 Michele Mazzucato
702 1 http://www.wikidata.org/entity/Q3886766 Q3886766
703 1 http://www.wikidata.org/entity/Q3645464 Bruce Edward Behymer
704 1 http://www.wikidata.org/entity/Q3660189 Carlton F. Stewart
705 1 http://www.wikidata.org/entity/Q3886747 Stardome Observatory
706 1 http://www.wikidata.org/entity/Q3886765 Q3886765
707 1 http://www.wikidata.org/entity/Q3886757 Q3886757
708 1 http://www.wikidata.org/entity/Q3886767 Q3886767
709 1 http://www.wikidata.org/entity/Q3928938 Rafael Carrasco Garrorena
710 1 http://www.wikidata.org/entity/Q3939927 Rodolfo Calanca
711 1 http://www.wikidata.org/entity/Q3678973 Claire Armstrong
712 1 http://www.wikidata.org/entity/Q3933643 Yuri Ivashchenko
713 1 http://www.wikidata.org/entity/Q4003098 Ulrich Hopp
714 1 http://www.wikidata.org/entity/Q3992445 Tom Boles
715 1 http://www.wikidata.org/entity/Q3943066 Ryan M. Williams
716 1 http://www.wikidata.org/entity/Q3973316 Steve Brady
717 1 http://www.wikidata.org/entity/Q4329976 Observatorio Astronómico de La Sagra
718 1 http://www.wikidata.org/entity/Q4374957 Q4374957
719 1 http://www.wikidata.org/entity/Q4793029 Zhang Jiaxiang
720 1 http://www.wikidata.org/entity/Q4132711 Emanuela Galliani
721 1 http://www.wikidata.org/entity/Q4228964 Enrico Colzani
722 1 http://www.wikidata.org/entity/Q4575766 Richard Kowalski
723 1 http://www.wikidata.org/entity/Q4749084 Amy B. Jordan
724 1 http://www.wikidata.org/entity/Q5324561 EURONEAR
725 1 http://www.wikidata.org/entity/Q4284267 Giuseppe Massone

726 rows × 3 columns

% matplotlib inline
import matplotlib.pyplot as plt
plt.hist([discoverer['count'] for discoverer in result])
plt.show()