private synchronized int count_servers(int numberOfUsers, int thrPerEngine) {
        int servers;
        if (thrPerEngine == 0) {
            servers = 0;
        } else {
            servers = numberOfUsers / thrPerEngine;
            if (numberOfUsers % thrPerEngine > 0) {
                servers++;
            }
        }
        return servers;
    }