The bells are actually physically rung by the zombies. If you see a zombie standing by a bell, kill dat zomb. It's more useful in the room leading up to the boss. When you enter the area and are on the little staircase leading down, go to the side of it - there's a zombie there ringing a bell. If you can kill him without hitting the bell yourself, the ghosts won't spawn even once.