Inverse deduction method
C bought his remaining half and another one. This is a broken egg left in the basket, which means that his half is two, and it was four before he bought it.
B bought his remaining half and another one. Before he bought it, it was (4+ 1)*2, which is 10.
A customer bought the other half of his total. Before he bought it, it was (10+ 1)*2, which is 22.
The farmer used to have 22 eggs.