I live in an islamic country. And mosque is very close to my house. But if i still pray at home will it be counted ?
It will be counted if you have an excuse.
The Prophet said: "Whoever hears the call and does not come, his prayer is not valid, except for those who have an excuse." Sunan Ibn Majah 793
The excuse is like being sick.
But prayer in Masjid (mosque) will grant you way more reward than praying at home. `You get rewarded for every step you walk, for the time you spend in the Masjed. 27 more times reward compared to praying alone, the more the group pray together, the more the reward, your name will be among the list of the Masjid's people, and many other rewards I will skip to keep the answer short.
Also, attending the prayer in the Masjid has great importance in Islam:
A blind man came to the Prophet (ﷺ) and said, "O Messenger of Allah, I have no guide to take me to the mosque." He [the Prophet (ﷺ)] therefore permitted him (to pray at his house), then when the man turned away the Prophet (ﷺ) called him and asked, "Can you hear the Adhan (call) for prayer?" He answered, "Yes". He [the Prophet (ﷺ)] said, "Then respond to it." [Reported by Muslim].
So he told him to go to Masjid