got the merge and count working