On the complexity of deciding connectedness and computing Betti numbers of a complex algebraic variety