Ok, it is simple.
You know the price of SP500 stock index futures right? for example 1600 points at this time. And the SP500 stock index futures is 250$ per point
So one contract's value is 1600*250, you have a portfolio worth 500000$ to hedge. So the futures number you need to short is 500000/1600*250. Since the index futures has a beta equal to 1, you have to adjust the number of the futures you need to short according to the relative beta between the portfolio and the futures. What you do is to multiply the number of the futures contracts number by the beta of the portfolio.
if the beta=1, the number of futures contracts you need to short=1*500000/1600*250
if the beta=0.5, the number of futures contracts you need to short=0.5*500000/1600*250
if the beta=1.5, the number of futures contracts you need to short=1.5*500000/1600*250
best,