Let's say I have Viewport size of 20x20 and a ColorRect node fill inside it with shader script.
How many fragment is it, is it 400 or more than that? If it more than that, how much more of it?
I'm not super well versed in shaders, so please take this with a grain of salt, but I believe fragment is called on each pixel of the screen that the object takes up. So if the size is 20x20 pixels, the entire ColorRect node is visible, and there is no Viewport scaling applied, then it will be 400 fragment calls, one for each pixel. This number can be reduced if the Viewport size is scaled down, and increased if the Viewport is scaled up. I think it really depends on the number of pixels the node occupies within the Viewport.
To add on to what @TwistedTwigleg said, the number of fragments processed by a shader greatly depends on the dimensions of the viewport. The number is always less than or equal to the width times height of the viewport depending on how much screen space the graphical element covers.