You can put whatever flights you want in your logbook.
but for the purposes of earning your private you can only count hours
when you were with a CFI (or solo and endorsed by a CFI) because you are not yet rated in the aircraft.
and, technically, if you were the one manipulating the controls, your friend can't log the time either.
read 61.51