How to count beats of a composition