<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getAmountOfHostsConnected(self, lanInterfaceId=1, timeout=1):
 """Execute NewHostNumberOfEntries action to get the amount of known hosts. :param int lanInterfaceId: the id of the LAN interface :param float timeout: the timeout to wait for the action to be executed :return: the amount of known hosts. :rtype: int .. seealso:: :meth:`~simpletr64.actions.Lan.getHostDetailsByIndex` """

        namespace = Lan.getServiceType("getAmountOfHostsConnected") + str(lanInterfaceId)
        uri = self.getControlURL(namespace)

        results = self.execute(uri, namespace, "GetHostNumberOfEntries", timeout=timeout)

        return int(results["NewHostNumberOfEntries"])