This varies country by country, state by state, and city by city. However, one of the beautiful features of a bike bell is that it is universally understood. Whether the person you are passing is a foreigner who speaks a different language, young, or elderly, everyone understands that the “ding!” of a bike bell means “I'm comin’ through!” or “excuse me!”
While there isn’t a specific or mandatory way to ring the bell or a certain amount of times to do it, most people agree that once is enough. If it is a particularly busy area, two rings may be a better warning. Any more than this, you and the bell may be seen as more of a nuisance.