For example, let’s assume that the controller of the Elder also controls two other creatures. If, after the Elder’s ability is activated, one of these creatures controlled by this player were to receive lethal damage and be destroyed by Brimstone Volley, then the Elder’s ability would only give the targeted creature +2/+2. (The Elder will count itself and the targeted creature, assuming it is controlled by the same player.)
Similarly, if the controller of the Elder were to cast and resolve an Ambush Viper after the Elder’s ability has been activated but before it resolves, then the value of X will increase and boost the power and toughness of the targeted creature even further.