returns how many bytes read