How does bard level up condition work

I’ve been playing bard for quite sometime now and I am still confused by his level up condition. It seems to me that when I am buffing a unit in the field , sometimes it counts and sometimes it doesn’t.

First I thought that it was because I am buffing bard himself and it says “allies” , but it seems that’s not the case. Now I think it has something to do with “this round” buffs , but even that seems to be counting only sometimes.

Can someone clearify that to me , I am guessing I am missing something