Psychosocial factors and episode number in depression