::
        
            HEAD /:login/machines
        
        Counts the number of machines total, or that match the predicates as
        with :py:meth:`machines`.
        
        :param machine_type: virtualmachine or smartmachine
        :type machine_type: :py:class:`basestring`
        
        :param dataset: unique ID or URN for a dataset
        :type dataset: :py:class:`basestring` or :py:class:`dict`
        
        :param state: current running state
        :type state: :py:class:`basestring`
        
        :param memory: current size of the RAM deployed for the machine (Mb)
        :type memory: :py:class:`int`
        
        :param tombstone: include machines destroyed in the last N minutes
        :type tombstone: :py:class:`int`
        
        :param tags: keys and values to query in the machines' tag space
        :type tags: :py:class:`dict`
        
        :Returns: a count of the number of machines (matching the predicates) 
            owned by the user at this datacenter
        :rtype: :py:class:`int`

def num_machines(self, machine_type=None, dataset=None, state=None, 
            memory=None, tombstone=None, tags=None):
        """
        ::
        
            HEAD /:login/machines
        
        Counts the number of machines total, or that match the predicates as
        with :py:meth:`machines`.
        
        :param machine_type: virtualmachine or smartmachine
        :type machine_type: :py:class:`basestring`
        
        :param dataset: unique ID or URN for a dataset
        :type dataset: :py:class:`basestring` or :py:class:`dict`
        
        :param state: current running state
        :type state: :py:class:`basestring`
        
        :param memory: current size of the RAM deployed for the machine (Mb)
        :type memory: :py:class:`int`
        
        :param tombstone: include machines destroyed in the last N minutes
        :type tombstone: :py:class:`int`
        
        :param tags: keys and values to query in the machines' tag space
        :type tags: :py:class:`dict`
        
        :Returns: a count of the number of machines (matching the predicates) 
            owned by the user at this datacenter
        :rtype: :py:class:`int`
        """
        _, r = self.request('HEAD', '/machines')
        num = r.headers.get('x-resource-count', 0)
        return int(num)