Yes onions are very healthy and can count as your five a day but you should increase the quantity of onions to at least 6 tablespoons instead of 3 tablespoons for it to count as your five a day.
You can also eat 3 tablespoons of beans and other vegetables such as potatoes, carrots etc to go with your five a day.