How does Social Security work if you are both employed and self-employed?

How does Social Security credit points work if you are both employed(receive W-2) and self-employed (sell on eBay, receive 1099-K)?

Do you just add up the payroll taxes you paid as employee and self-employed to figure out how much social security you expect to receive after retirement?