What is a a good way to track over time the amount of data transferred from my ubuntu machine to another host on the internet?
That greatly depends on how you transfer it. If you have some sort of a VPN, then vnstat can track traffic per interface. These are for example monthly statistics from a VPN I'm using:
Of course, this is per network interface, not per host. vnstat can be configured to keep a persistent database (flat files).
Another way would be to set up a forward rule in iptables and read iptables traffic statistics (iptables -nv).
But a proper solution would be to use dedicated software with traffic accounting. DrFTPD has a quota plugin.