Coupler curves of moving graphs and counting realizations of rigid graphs