wa Alaikum Assalam wa Rahmatullahi wa Barakatuh ...
Tahajjud is Nalf (voluntary) prayer and it can be prayed anytime after 'Isha until Fajr, but the best time to pray Tahajjud is the last-third part of the night. For example, if Maghrib is at 6.30 pm and Fajr is at 6.30 am, then the whole night is of 12 hours. The best time to pray Tahajjud will be to start praying during the last 4 hours, that is after 2.30 am until Fajr.
The number of Rakat is not fixed. You can pray 8 or 10 or 12 or as many as you want, but in units of Two Rakat each. That means, after every two Rakat, you should sit down for Tashahhud and say the Salam to end the prayer. And then start again if you want to continue for more.
The Witr is normally prayed after Tahajjud at the end.
Narrated Ibn `Abbas :ra:: The prayer of the Prophet :saws: used to be of thirteen rak`at, i.e. of the night prayer. [
Bukhari]
Narrated Masruq: I asked Aisha :raha: about the night prayer of Allah's Messenger :saws: and she said, "It was seven, nine or eleven rak`at besides the two rak`at of the Fajr prayer (i.e. Sunna). " [
Bukhari]
Narrated `Aisha :raha:: The Prophet :saws: used to offer thirteen rak`at of the night prayer and that included the witr and two rak`at (Sunna) of the Fajr prayer. [
Bukhari]