Unless you're from a country that requires you to obtain an exit visa, there is no sharing of information as a general rule.
Even in cases where there are information sharing agreements, such as between the US and Canada, the US and Mexico, or in the Schengen area, the information that is shared is about people from outside the info-sharing nations, but not about their own citizens.
It may be possible for one country to ask for legal assistance to obtain information about a specific person, and who knows what information is shared by the secret services, of course, but on the visible side, countries do not know what their citizens do while away.
EDIT As pointed out by @HaLaBi, the Advanced Passenger Information System (APIS), where airplane passenger data is transmitted to the destination country. Thus, your government may not know where you're headed, but they will know from where you return, if you come back by plane.