(CO)5Re-Re(CO)5
Each Re atom has 7 own electrons
When Re-Re single bond is formed, one electron from one Re is shared with one electron from another Re:
Re(6e+1e) + Re(6e+1e) = (6e)Re(2e)Re(6e)
After a single Re-Re bond is formed, each Re atom is surrounded by 8 electrons:
(6e)Re(2e)Re(6e) and (6e)Re
(2e)Re(6e)Plus 10 electrons from five CO ligands.
Thus, each Re atom is surrounded by total 18 electrons
I hope this helps