![enter image description here](
After constructing the semicircle EDC using EC as diameter, we can slide C along the vertical line through B. This shows there are 0, 1, 2 possible solutions. It is just the discussion of how many ways that a line cuts a circle.
Also, there is an extreme case:- when g = 0.