public int getNumPedidoClienteById(int id){
        int numPedido = 0;
        String consulta = "SELECT COUNT(*) AS numPedido FROM cliente AS c "
                        + "INNER JOIN pedido AS p ON p.id_cliente = c.id WHERE c.id = "+id;
        
        try{
            stmt =  Myconnection.getStatement();
            ResultSet rs = stmt.executeQuery(consulta);
            while(rs.next()){
                 numPedido = Integer.parseInt(rs.getString("numPedido"));
            }
            stmt.close();

        } catch(SQLException e){
            JOptionPane.showMessageDialog(null, "Erro no excluir!");
            e.printStackTrace();
        }
        return numPedido;
    }