ok, i think you are probably holding a glass jar no larger than a coffee mug because you (correctly) think you deserve a treat but you don't want to be excessive about it. And I think it's a new or almost-new container—if it was nearly empty, I could just count the number of beans.
I bet that container is probably 10cm in diameter (internal) and 15cm high (so bigger than a coffee mug I guess). That means it has a volume of π x (10/2)² x 15 = 25π x 15 = 375π cm³.
A jellybean is an irregular shape but we can approximate. if we were to straighten out a jellybean, it would be close enough to a cylinder with a hemisphere on each side (this is probably an over-estimate. I bet the cylinder would actually be tapered like a very-long cone with most of the top chopped off). to keep things simple, let's say that shape would be a 1cm tall cylinder capped with a 1cm diameter hemisphere. There are two hemispheres so its volume will be a cylinder + a sphere: (π x (1/2)² * 1) + (4/3 * π * 1³) = 0.25π + 4/3π = 19/12π cm³
Ok, so how densely do jellybeans pack into a container? Optimal sphere packing is just shy of 3/4. As jellybeans are curved (and in a way they could nestle), I don't have any particularly compelling reason to assume the optimal jellybean packing is significantly different, but they are a shape with three different proportions across their three planes. For that reason (and for the reason that I don't think a jellybean jar seller has any particular incentive to agitate the containers into an optimal state), I am going to assume that the actual density is significantly lower. Let's go to 2/3 as that feels more right than 3/5.
Given that, the number of jelly beans would be ⌊375π / 19/12π * 3/5⌋ = ⌊(375 * 12 * 3) / (19 * 5)⌋ = ⌊(75 * 12 * 3) / 19⌋ = ⌊2700 / 19⌋ = 142. Huh, fewer than I would have thought
Alternate answer: 0. you set it down because it took me too long to work this out
edit: i did the math wrong. I did sphere volume with diameter not radius:
(π x (1/2)² * 1) + (4/3 * π * (1/2)³) = 3/4 π + (4/3 π * 1/8) = 3/4π + 1/6π = 13/12π
⌊375π / 13/12π * 3/5⌋ = ⌊(375 * 12 * 3) / (13 * 5)⌋ = ⌊2700 / 13⌋ = 207
