Reference counting is quite literally a subset of garbage collection.
Then malloc/free are quite literally a subset of the borrow checker :)
Garbage Collector acts mainly in unpredictable way. I mean it is possible it won't free memory even if counter is zero already. This is not true if we are talking about Rust.