On the unit interval number of certain graphs