You need to figure out where T maps the basis vectors of R^n. Suppose, for example, that n = 4. The first basis vector has coordinates (1, 0, 0, 0), and T(1, 0, 0, 0) = (1, 0, 0, 1). Next, T(0, 1, 0, 0) = (0, 1, 1, 0). Similarly, T(0, 0, 1, 0) = (0, 1, 1, 0) and T(0, 0, 0, 1) = (1, 0, 0, 1). Now, the dimension of the image is the dimension of span((1, 0, 0, 1), (0, 1, 1, 0), (0, 1, 1, 0), (1, 0, 0, 1)) = 2, so dim ker(T) = 4 - 2 = 2. Check also what happens when n = 5.