Fix checking of habits count to use reactive source instead