        program quickstats
c
        character*1 keep
	integer ngrades(3,9)
        integer ntot(3)
c
        open(10,file='orb6.master',status='UNKNOWN')
c
        nstars=0
        nyes=0
        norbs=0
c
        do 100 n=1,4
  100   read(10,900) keep
  900   format(t250,a1)
c
	do 150 ndec=1,3
	do 150 igrade=1,9
  150	ngrades(ndec,igrade)=0
c
  200   read(10,901,end=300) idec,grade,keep
  901   format(t10,i3,t244,f3.1,t250,a1)
        if (keep .ne. ' ') norbs=norbs+1
        if (keep .eq. ' ') nstars=nstars+1
        if (keep .eq. 'y') nyes=nyes+1
        if (keep .ne. 'y') go to 200
c
	ndec=1
	if (idec .lt. 10) ndec=2
	if (idec .lt. -9) ndec=3
	igrade=nint(grade)
	if (igrade .eq. 0) igrade=1
	if (grade .eq. 5.5) igrade=5
	ngrades(ndec,igrade)=ngrades(ndec,igrade)+1
	go to 200
c
  300   do 450 ndec=1,3
        ntot(ndec)=0
        do 400 igrade=1,5
        ntot(ndec)=ntot(ndec)+ngrades(ndec,igrade)
  400   continue
  450   continue
c
        write(6,902) nyes,nstars,norbs
  902   format('Orbit Stats, as of'//
     $     ' No. of keepers, systems, orbits = ',3i8//
     $     ' Distribution by grade (1-9) and Dec (>10, equator, <10):'/
     $     t16,'grade 1    2    3    4    5    6    7    8    9   ',
     $     'total (1-5)')
c
        write(6,903) (ngrades(1,igrade),igrade=1,9),ntot(1)
  903   format('+10 < dec < +90  ',9i5,i9)
        write(6,904) (ngrades(2,igrade),igrade=1,9),ntot(2)
  904   format('-10 < dec < +10  ',9i5,i9)
        write(6,905) (ngrades(3,igrade),igrade=1,9),ntot(3)
  905   format('-90 < dec < -10  ',9i5,i9)
c
  999   stop
        end
