Different implementation of each loop

Hi, i want implement a different handlebar each loop implementation, for example, iterate the half number of the total collection (if the total number of collection is 8 or 9 this iterate only 4), add a html tag and inside print 2 values of the collection.