It shouldn't count because there's never a valid excuse for not having done one's homework. But if there ever was a valid excuse for not having finished one's homework this would most certainly be it.
And it's exactly the sort of excuse Professor Slughorn would accept. Perhaps even without the gift of crystallized pineapple.