update stats.sqf library with support for merge, keys, and count operations