There lived a husband and wife who loved each other dearly. One day the wife fell very sick and later it was found that there was no possible way to cure her. Upon realizing that death would soon take her away, she said to her husband, “I love you so much! I don’t want to leave you, and I don’t want you to betray me. Promise that you will not see any other women once I die, or I will come back to haunt you.”
For several months after her death, the husband did avoid other women, but then there are times when the unexpected happens and the unexpected did happen when he fell in love. Soon both got engaged to be married.
But on the night of their wedding, the ghost of his former wife appeared to him. She blamed him for not keeping the promise, and every night thereafter she returned to taunt him. The ghost would remind him of everything that transpired between him and his fiancee that day, even to the point of repeating, word for word, their conversations. It upset him so badly that he couldn’t sleep at all.
Out of desperation, the husband sought the advice of a Zen master who lived near the village. The master listened to his story with a smile and said, ”This is a very clever ghost. "It is!" replied the man. "She remembers every detail of what I say and do. It knows everything!". The master smiled again, "You should admire such a ghost, but I will tell you what to do the next time you see it."
That night the ghost returned to taunt the husband. But this time he did just as the master had advised.“You are such a wise ghost,” he said to the ghost, “You know that I can hide nothing from you. If you can answer my one question, I will break off the engagement and remain single for the rest of my life.”
“Ask your question,” the ghost replied. At that moment, the husband scooped up a handful of beans from a large bag on the floor, “Tell me exactly how many beans there are in my hand.”
At that moment the ghost disappeared and never returned.