Thank you! I changed it a bit to work for my usecase where I start my section numbering at 0 and it works!
The full code I use is:
#show heading.where(level:1): it => {
counter(math.equation).update(0)
it
}
#set math.equation(numbering: it => {
let count = counter(heading.where(level: 1)).at(here()).first()
if count > 0 and start_section_numbering_at_0 {
numbering("(1.1)", count - 1, it)
}
else {
numbering("(1.1)", count, it)
}
})