'Returns the sum of the number of seeds and peers. This function
works only if the Download.set_state_callback() /
Session.set_download_states_callback() was called with the getpeerlist
parameter set to True, otherwise returns (None,None)
@return A tuple (num seeds, num peers)'

def get_num_seeds_peers(self):

    if ((self.stats is None) or (self.stats.get('spew', None) is None)):
        total = self.get_num_peers()
        non_seeds = self.get_num_nonseeds()
        return ((total - non_seeds), non_seeds)
    total = len(self.stats['spew'])
    seeds = len([i for i in self.stats['spew'] if (i.get('completed', 0) == 1.0)])
    return (seeds, (total - seeds))
