def count(self, page_size=10, vtimeout=10, callback=None):
        """
        Utility function to count the number of messages in a queue.
        Note: This function now calls GetQueueAttributes to obtain
        an 'approximate' count of the number of messages in a queue.
        """
        def counted(a):
            if callable(callback):
                callback(int(a['ApproximateNumberOfMessages']))
        self.get_attributes('ApproximateNumberOfMessages', callback=counted)
Utility function to count the number of messages in a queue.
        Note: This function now calls GetQueueAttributes to obtain
        an 'approximate' count of the number of messages in a queue.