How to use count and depends on together

Is this possible ?

module "abc"{
count = var.enabled?1:0
depends_on=[resource]
.
.
.
.
}

Why not try it and see?

That’s what most people answering would have to do.