If you get a kill after you have died, but before you enter "afterlife" (the all grey world with nothing to do), the game will display the message: "XXXX has killed player YYYY for ZZZZ gold!". However, it will not go to your stats (the one's that appear when you press tab.) So the enemy will have 1 death, but the stats won't show you with the 1 kill.
If the player dies after you have entered the afterlife, it seems to work correctly. (If memory serves correctly, hasn't happened in a while so can't confirm this 100%.)
Likely situations where you might get kill after you die: Spit. Poison blood. Mines. Ect.