First thing: Develop a mindset with positive attitude that you are here for more than 10 years at least, hence act with maturity and in a professional manner!
You will discovery every other things on your own, if you can develop this mindset!
You don't calculate quantity first,you calculate your total risk per trade, that maybe be 500 or 5000, and now you check your entry and stoploss to find risk per unit. Divide your total risk by per unit risk you will get your quantity for the trade!