def dnsDomainLevels(host):
    """
    :param str host: is the hostname from the URL.
    :return: the number (integer) of DNS domain levels (number of dots) in the hostname.
    :rtype: int
    """
    return host.count('.')