We present a strategy to derive an efficient reference count garbage collector for any applicative program by only modifying it on the source code level. The key to the approach is to consider the memory as an explicit parameter of the applicative program, thus enabling to implement data structures in terms of memory primitives. On the basis of equivalence preserving source level transformations, reference count instructions are generated and optimized in order to reduce their inherent run-time overhead, and to introduce run-time detected selective update on recursive data structures.