Question: I created to following code to retrieve search results via `load()`. The trouble I'm having is that the callback function of the load fires before the ajaxed results are on the DOM. Sometimes the timing seems right, but often it's up to a second early.

```
  // assign area to load content
  var mainContent = $("#ajaxContent");

  // on form change
  $('#facets').change(function(e){

    // serialize form data
    var formData = $("#facets").serialize();

    // fade in loading animation while fade out page
    $('#preload').fadeIn();
    $('.wrap').fadeTo("fast", 0.33);

    // ajax search results, on callback fade out animation, fade in page
    mainContent.load('?' + formData + ' #ajaxContent', function(){
       $('.wrap').fadeTo("fast", 1);
       $('#preload').fadeOut();
    });

    e.preventDefault();
  });

```

Any obvious mistakes? Thanks!

Answer: 
There doesn't seem to be a clean wrapper for these kinds of usecases in redis-py yet, I ended up using a normal redis command to get the subscribers of a specific channel

```
r = redis.StrictRedis(**{
    'host': $WhateverHost,
    'port': 6379,
    })

pubsub = r.pubsub()
pubsub.subscribe('MyChannel:ID')
....
subscriber_count = r.execute_command('PUBSUB', 'NUMSUB', 'MyChannel:ID')

```
You can use the StrictRedis connection, then create a pubsub object:

```
pubsub(self, shard_hint=None) method of redis.client.StrictRedis instance
    Return a Publish/Subscribe object. With this object, you can
    subscribe to channels and listen for messages that get published to
    them.

rc = redis.StrictRedis()
ps = rc.pubsub()
ps.subscribe(channel)
numsub = ps.subscription_count

```

The pubsub object has methods for subscribing to channels, and a field called subscription\_count that give the number of subscribers to the channel.