         else
             opts.cb?()
 
+        # Also decrement count of changefeeds for given client
+        client_name = @_user_get_changefeed_id_to_user?[opts.id]
+        if client_name?
+            @_user_get_changefeed_counts[client_name] -= 1
+            delete @_user_get_changefeed_id_to_user[opts.id]
+
+
     user_query: (opts) =>
         opts = defaults opts,
             account_id : undefined

#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################

fs         = require('fs')
async      = require('async')

                    options    : options
                    multi      : multi
                    changes    : changes
                    cb         : (err, x) =>
                        if err and changes
                            cnt[client_name] -= 1  # didn't actually make the changefeed, so don't count it.
                        opts.cb(err, {"#{table}":x})
        else
            opts.cb("invalid user_query of '#{table}' -- query must be an object")

