Praise be to Allah.
It is better for a Muslim to observe i’tikaaf during all of the last ten days, following the example of the Prophet (peace and blessings of Allaah be upon him). Al-Bukhaari and Muslim narrated from ‘Aa’ishah (may Allaah be pleased with her) that the Prophet (peace and blessings of Allaah be upon him) used to spend the last ten days of Ramadaan in ‘i’tikaaf, until he passed away. Narrated by al-Bukhaari (2025) and Muslim (1171).
If he cannot spend all of the last ten days in i’tikaaf, and he limits himself to some of the days or nights, there is nothing wrong with that. Al-Bukhaari narrated that ‘Umar ibn al-Khattaab (may Allaah be pleased with him) vowed to spend one night in i’tikaaf in al-Masjid al-Haraam, and the Prophet (peace and blessings of Allaah be upon him) told him to fulfil his vow. Narrated by al-Bukhaari (2042) and Muslim (1656). This indicates that it is valid to observe i'tikaaf for one night.
In the answer to question no. 38037 we stated that there is no minimum for i’tikaaf and we quoted a fatwa from Shaykh Ibn Baaz concerning that.
What you should do is strive hard in worship during those nights, and strove to earn as much hasanah as much as you can.
And Allaah knows best.