@classmethod
def _update_query(cls, stamp, count=1):
    """
        Return the update query for the datetime `stamp`.

        :param stamp: A UTC datetime
        :param count: Number to increment
        :type stamp: datetime.datetime
        :type count: int

        """
    update = {}
    for interval in cls.config_intervals:
        update.update(cls._update_clause(interval, stamp, count))
    return {'$inc': update}
