It was very frustrating at first and I actually wondered if the game was winnable, but after 7 tries (not including a re-start) I got the 30 ghosts, and the ending was very cute and much more relaxing lol. I played again to see if picking other options changed the outcome or script, and I even got 32 ghosts once (it was less frustration the second and third times around, thought that may just be because I got better at it)
I hope this tip to other players doesn't count as a spoiler:
don't give up on the last ghost, just keep trying and it will get tired!