The Earth King's second ability counts the number of creatures with power 4 or greater you attack with when the ability triggers. Even if some or all of those creatures are no longer attacking or no longer have power 4 or greater when the ability resolves, they still count towards how many lands you can search for.