Shaders don’t work like that. That instruction count is the size of the compiled program, not how many instructions are being executed based on the inputs. Also, dynamic flow control should be used with lots of care: it can actually hurt performance if misused.
GPUs contain a large number of “cores” (streaming processors) that execute shaders in parallel batches which are run in lockstep. This means that each shader instruction operates on the values of several pixels at once (32 on NVidia GPUs and 64 on AMD ones). When a dynamic branch is reached, if any of the threads in the batch diverge both sides of the branch will be executed for all threads with each one simply discarding the results of the untaken branch.
Also, since the values of untaken branches are not kept, you cannot call DDX and DDY instructions inside branches. This means you also cannot rely on automatic mip map selection when sampling textures inside branches since those rely on derivative calculation (GPUs will try their best to guess the correct values, but there may be artifacts). You have to either specify mip level manually or use derivative values calculated outside a branch.