A good deed does not have to be selfless to matter. New research reveals what makes kindness truly count.