I read somewhere that in the case of photoshop for example, the size refers to the number of pixels an image contains, but resolution involves the pixel's size, I don't know whether this definition goes for all the other fields. In computer vision, what's the difference between image size and image resolution?
Image size and image resolution generally have the same meaning in most cases. They usually refer to the dimensions of a 2D image, measured in pixels.
Image size can refer to the dimensions of a printed image.
In other contexts, image resolution can refer to an image's spatial resolution, which is a measure of the number of independent pixel values per unit length measured in a world coordinate frame. For example, in satellite imagery, we can measure the quality of a lens by determining its spatial resolution from its images of the earth.
In the photoshop sense, image resolution refers to the quality of the printed image: how much physical space each image pixel will take up when it is printed.
In the computer vision sense, it's reversed: how many pixels that each unit of physical space takes up when it is captured by the camera. (This measurement is entirely dependent on the distance between the camera and the subject.)