Arthur's multiplicity formula for GSp$_4$ and restriction to Sp$_4$