public int size(String cod_competicao) {
        try {
            int i = 0;
            Statement stm = conn.createStatement();
            ResultSet rs = stm.executeQuery("SELECT Cod_Equipa FROM EquipaTorneio where cod_competicao='"+cod_competicao+"'");
            
            for (; rs.next(); i++);
            return i;
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE);
            return -1;
        }
    }