The equation means "get the value of F in the pixel (u, v), evaluate (the formula on the right side)." Thus, in order to obtain the entire transformed image, it was evaluated for each pixel in the transformed image.
To calculate the DFT using the formula, you need to do an O (1) calculation for each input value for each output value. (There are other, faster algorithms for some types of data.) In your 2D DFT case, the algorithm has complexity O ((M * N) ^ 2), because the number of input pixels is M * N and the number of output pixels are also M * N.
edit: 2D- DFT O (NM ^ 2 + MN ^ 2), . : http://fourier.eng.hmc.edu/e101/lectures/Image_Processing/node6.html