Only earned income counts toward your future Social Security benefits. Income you are getting from investments will not increase your SS benefits.
How works affects SS benefits
https://www.ssa.gov/pubs/EN-05-10069.
Edit---sorry for the dead link above
And go to www.ssa.gov to read more information