that I've lost count. Never anything that I felt in real danger, however. One made a false charge at me once, but it was a very small bear.
The scariest took place on my very first "true" backpacking trip. I had hung my food, (counter balanced from a tree limb, which back then was standard procedure), about 100' from my sleeping bag. I wasn't using a tent that night, I seldom sleep in a tent unless it's raining. I always keep a small flashlight around my neck for late night bathroom trips or whatever.
Sometime in the middle of the night I heard noise over by the tree where I had hung my food. Bears are BRILLIANT, and can find ways to get your food even when properly stored. I rolled to my stomach, I was using my backpack as a pillow, and pointed my flashlight in the direction of where I guessed my food was hung... thinking it was a raccoon. I aimed and clicked on my flashlight...
6" from my face a black bear, (full sized one), was sniffing the backpack I was sleeping on. I instantly went into my best impression of a "Daffy Duck Hysterical Fit"... and it worked. Scared the hell out of the bear.
When bears figured out how to get food that was counter balanced they made it a law, in certain areas, that you had to carry a bear canister, so I got one. I believe every single backpacking trip I took in Yosemite at least one night a bear would try to open my canister. I'd just toss it out on the ground, away from where I was sleeping, and bears would attack it during the night.. beating it, throwing it, but they were never able to open it.
One more quick one: The first year they made carrying a bear canister mandatory I ran into a ranger on the trail and asked why... he said the bears I had figured it out. He watched a black bear climb a tree 'above' the limb food was hung on and then jump OUT of the tree - hitting the limb, breaking it, and getting the food.
Amazing creatures. - JamesJM