Karlov attacking together with a lifelink creature
All damage is dealt at the same time, so Karlov of the Ghost Council will only get the +1/+1 counters after it has dealt damage.*


Combat Damage Step

510.1. First, the active player announces how each attacking creature assigns its combat damage, then the defending player announces how each blocking creature assigns its combat damage.
510.2. Second, all combat damage that’s been assigned is dealt simultaneously.

*Unless the Lifelink creature also has First Strike or Double Strike