Yes, it can count. Section 72(t)(2)(I)(iv) provides that the term “emergency personal expense distribution” means any distribution made from an applicable eligible retirement plan to an individual for purposes of meeting unforeseeable or immediate financial needs relating to necessary personal or family emergency expenses. See IRS - Guidance for Retirement plan distributions on certain exceptions.