Just like you, enemies can hide behind cover. Now, this doesn’t mean you have to keep shooting when they pop their heads out. If they are weaker than you you can always throw a grenade. Or, run behind their cover and shoot them. If they’re still “hiding” behind cover when you kill them, it will count. So it’s not very hard as they like to stay there until you kill 50 of them.