How to transfer Itunes music from my Iphone to my laptop?

I have windows 8.1 if that matters. And I have the Iphone 5s.

You can't. It's a one way transfer (iTunes to device, not the other way around).

How to move your iTunes library to a new computer
https://support.apple.com/...s/HT204318

You may find the truth is that iTunes allows users to sync music from computer to iPhone, but not vice versa. Generally you can't do that without outside help. AnyTrans allows you to transfer music among iOS devices, iTunes and computer, and it also enables you to get iPhone music to laptop.